You are not logged in.
Pages: 1
Hello!
Have folder:
C:\test\test1\test2\test3\file.ext
Using :File_FolderName: tag only inserts folder's name where the file is (test3), is there a way add parent folder names (test, test1, test2) ?
Thank you.
Offline
You can use PascalScript rule, it will allow you to use the file path in any imaginable way.
For example, the code below will prefix each file with all its subfolders separated with a dash:
var
Temp: WideString;
begin
Temp := WideExtractFilePath(FilePath);
Temp := WideCopy(Temp, 4, Length(Temp));
Temp := WideReplaceStr(Temp, '\', ' - ');
FileName := Temp + FileName ;
end.
Offline
Wow! 9 minutes and ready to use and working solution!
Thank you very much!
P.S.
may I ask you why Pascal?
Offline
I was just around, reading through posts, usually it would take longer
may I ask you why Pascal?
What do you mean? Why not other rule, or why not other language?
Offline
Yes, why Pascal language?
Isn't it pretty much "dead" language by now?
Offline
Oh, well, the answer is simple: ReNamer is written in Pascal (Delphi)
And I can assure you that it is not dead! It is coming back to live now: CodeGear, FreePascal, etc...
Offline
Oh!:D
Thanks again for this great program(s) and support!
Offline
Pages: 1