ZTree.com  | ZEN  | About...  

 Index   Back

[Wish] Rename function, current folder variable   [Wish]

By: Ben Kent       
Date: Jul 25,2011 at 13:07
In Response to: [Wish] Rename function, current folder variable (Donald_SBC)

> I have a project where picture are stored under a numbered folder
> which is under another folder, i.e. E:\Pictures\01234\
>
> The pictures are named by a scanner. When moved to the numbered folders
> they get renamed to fffff_nn.jpg where fffff is the current folder name
> (not full path) and nn is a sequential number.
> E:\Pictures\01234\01234_01.jpg
>
> A rename mask like |cf|_:01:.* where |cf| gets substituted by the
> current folder would be great.

I also needed this yesterday, in my instance a process creates files of a fixed name, and I need to rename to the directory name.

The pipe character cannot be used as you suggest as that character is already used to allow multiple rename actions in one rename mask. What would work, would be an extension of the :: insert, like the a, c, w modifiers currently work, but a new modifier for naming, maybe just use the current Batch Parameters in section 3.4.1 of the help file to keep things consistent, i.e. % is the new modifier character, some of the values of the batch parameters would need to be modified (the date separators for example) or disallowed batch parameters just not supported.

Then your rename mask would be ":%6:_:01:.*", Jürgen's would be "<:%6:>*.*", and mine would have been ":%6:.*".

Ben

1,226 views      
Thread locked
 

Messages in this Thread

 
96,656 Postings in 12,233 Threads, 350 registered users, 41 users online (0 registered, 41 guests)
Index | Admin contact |   Forum Time: May 12, 2024 - 8:12 pm UTC  |  Hits:63,415,493  (17,404 Today )
RSS Feed