ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Macro-only solution   [Help!]

By: Laurent Duchastel     Montréal, Québec  
Date: Jun 06,2015 at 01:23
In Response to: [Help!] Batch renaming challenge (Laurent Duchastel)

Find a simple solution with macro only as follows:

r,RET,
;Place original filename in history (in case something happen)

r,QUOTE,SPACE,QUOTE,#,QUOTE,RET,Y,
;Replace all space with #

r,QUOTE,#-#,QUOTE,SPACE,QUOTE,RET,Y,
;Replace the dash with space. Now the two segments Title and Author are unambigiously defined

r,CTRL_LEFT,CTRL_LEFT,CTRL_SH_RIGHT,SH_LEFT,CTRL_X,BKSP,HOME,CTRL_V,SPACE,-,SPACE,RET,
;Cut-Paste second half in first half

r,QUOTE,#,QUOTE,SPACE,QUOTE,RET,Y,r,
;Restore space

HOME,CTRL_SH_RIGHT,TAB,LEFT,COMMA,RET,
;Capitalize Name and put comma


I still have to do some handling by hand because files are not named consistently accross the collection (sometime "first last", some other time "last first", or having with two authors, etc.). But I have variant of the macro to handle these.


Laurent Duchastel

819 views      
Thread locked
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 45 users online (0 registered, 45 guests)
Index | Admin contact |   Forum Time: Apr 18, 2024 - 2:07 am UTC  |  Hits:62,906,390  (814 Today )
RSS Feed