You are not logged in.
Pages: 1
When I want to rename a file and insert the name of the containing folder in the file name I use this:
:File_FolderName:
What if I want to insert the name of the folder one level up. In other words I want to insert the name of the folder that contains the subfolder where the file resides?
Can that be done?
EDIT: I noticed some threads in the forum asking similar questions, and it seems that it can be done using a Pascal Script. I have very basic coding skills and even after reading those threads, I'm still not sure how to use such a script in ReNamer to get the results I need.
If anyone has a couple of minutes to coach me through this, it would be much appreciated
Last edited by adiosdonut (2021-11-09 17:14)
Offline
There are a few different ways of achieving this, each differs by taste.
Here are a couple:
Method A
Insert the ":File_FolderPath:" meta tag and then use other rules, like the Regular Expressions, to remove the parts you don't want.
Method B
A pascal script:
begin
FileName := WideExtractFileName(WideExtractFileDir(WideExtractFileDir(FilePath))) + ' - ' + FileName;
end.
For the reference:
https://www.den4b.com/wiki/ReNamer:Pascal_Script
Offline
Pages: 1