You are not logged in.
Pages: 1
I have the task of renaming a huge amount of directories with the amount of files in them.
Before:
"My dir" which has 123 files inside it.
"My other dir" which has 321 files inside it.
"My empty dir" which has 0 files inside it.
After:
"My dir 123"
"My other dir 321"
"My empty dir 0"
How do I do this?
Disclaimer:
Although I'm a software engineer and could write an app for this myself, I was hoping to save a lot of time by having Renamer do this.
Offline
http://www.den4b.com/forum/viewtopic.php?pid=4494#p4494
Take a look here to the post #4.
In your case the mask would be just "*".
Some more info about the scan function in this page:
http://www.den4b.com/wiki/ReNamer:Pasca … :Functions
If this software has helped you, consider getting your pro version. :)
Offline
Ah! That's great. I didn't realize you could do that.
It worked very well indeed. Thank you very much.
Here is the script:
var
Files: TStringsArray;
begin
SetLength(Files, 0);
WideScanDirForFiles(FilePath, Files, True, True, True, '*');
FileName := FileName + ' ' + IntToStr(length(Files));
end.
Edit:
Good heavens! I just checked Pascal_Script:Functions and saw a lot more was possible!
I have always had a bit of difficulty using Renamer, but with these functions I (as a developer) can much more easily do what I want to do.
Thank you, thank you, thank you!
Last edited by iycgtptyarvg (2010-11-23 09:53)
Offline
One last question:
Can I do something to change the filter settings? For most of my renaming I use only files, but this script obviously only uses folders. Is there a way to set that mode automatically in a rule?
Offline
You can save the preset with that rule, and on the save dialog you'll have a check box where you can specify to save the filter with it.
If this software has helped you, consider getting your pro version. :)
Offline
That worked! I feel my life is now complete and all is right with the Universe. ;-)
Offline
Pages: 1