ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] mass rename mask   [ZEP]

By: Art Kocsis     So Calif  
Date: Apr 25,2024 at 04:34
In Response to: [ZEP] mass rename mask (Donald_SBC)

> I use a rename mask :%6:_:01:.*
> When in a logged folder I Ctrl-T, Ctrl-S then Ctrl-R with the mask. So
> in a folder nameed 04783 I end up with files named
> 04783_01.jpg
> 04783_02.jpg
> etc
> Doing this for many folders gets tedious.
> What I would like to do is Log a few folders, Ctrl-G, Ctrl-T, Ctrl-S
> and Ctrl-R with a mask that does the following:
> Change the value of %6 when the folder changes
> Reset the counter :01: back to 01 when the folder changes

I am a bit late to the party here but hopefully this will help with future tasks.

ZTW is a fabulous multi-functional tool that seemingly can do anything. However, sometimes it is not the best tool for the job. (Blasphemy, I know!) I suggest you look into a little freeware program called Bulk Rename Command (BRC). BRC is the command line version of Bulk Rename Utility (BRU). BRC/BRU, as their names imply, perform rename tasks six ways from Sunday including substitutions, replacing, sequencing, RegEx edits, extracting and applying Exitf photo data, et al.

Use ZTW for what it does best - selecting your target objects - and then let BRC do the renaming. Simply tag your target folders in ZTW in dir mode and then Cntl-B those folder names to a batch file command line that calls BRC:

Cntl-B ==> BRC64.exe /DIR:"%1" /NOFOLDERS /FIXEDNAME:%6 /AUTONUMBER:1:1:S:_:10:2 /PATTERN:*.jpg /EXECUTE

Omit the "/EXECUTE" argument to instruct BRC64 to go through the motions of the rename commands and to display the results but to not actually rename any files or folders. When satisfied, include the "/EXECUTE" to actually rename your files.
Add this to your F9 menu or permanent Cntl-B history for total ease of use.

The path to BRC64.EXE obviously has to be defined for your system.
This can be accomplished in a multitude of ways:

• Include the path to BRC64.EXE in the Windows PATH environment
• Replace "BRC64.EXE" with its full path
• Save the target batch file in the BRC64.EXE folder
• Create a subkey "BRC64.EXE" under the parent key:

      HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

   Set its default value to the full path of BRC64.EXE (with no arguments)
   Replace "BRC64.EXE" with:

      Start "" /B BRC64.exe

The Registry App Path key, in essence, catalogs the target app in your system (a la OS360/370).

   For CMD.EXE environments the "Start" command is required
   For Explorer environments the subkey name is sufficient
   For Task Scheduler environments is does not seem to work

Please note the while the subkey names look like exe fle names they are not
   [Ref: Adding applications to the Path, By Vic Laurie]

Namaste', Art

Press any key to exit,
Press any other key to continue...
- unknown


Messages in this Thread

96,656 Postings in 12,233 Threads, 350 registered users, 28 users online (0 registered, 28 guests)
Index | Admin contact |   Forum Time: May 18, 2024 - 12:35 pm UTC  |  Hits:63,519,076  (3,780 Today )
RSS Feed