#1 2006-04-28 00:09

dmp
Member
Registered: 2006-04-28
Posts: 3

help for renaming folders

Hi,

I'm sure it's me being dense, but I just can't seem to get my folders named the way I'd like. What I'm after is taking a directory folder named *to file* that contains subfolders, too. I'd like to rename the subdirectory folders with the prefix *RAW_* followed by a three-digit serialized number that increases by one. Hopefully I end up with this: RAW_023, RAW_024....

My problem was 1) couldn't make the serial thing happen and 2) in my test runs with one directory folder containing three subs, only the first subfolder would rename as RAW_. What am I missing here?

Thanks for your help,
Dan

Offline

#2 2006-04-28 11:06

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: help for renaming folders

Hi dan,

First thing first.. If you want to add subfolders from a directory, then you have to use "Add folders" dialog. Click on the "Add Folders" button at the top menu, then switch to a "Add folders as files" mode, and in the new dialog find an option called "Add subfolders from an added folder" - tick it. Then, drag over your main folder, and only all the subfolders from it will be added to the field provided in that dialog. Then, simply click "Ok", and your subfolders will appear in ReNamer smile

Warning: DO NOT rename parent folders first!
Example: If you have folders like: "C:\temp\folder1", "C:\temp\folder2", "C:\temp\folder1\subfolder1".
If you rename "C:\temp\folder1" first, then 3-rd item will fail to rename because it will not be found!
Use Special sort by Folder Structure (in reverse) to escape from this problem.

Now, about rules...
1) Delete from position 1 till the end (to empty the name);
2) Serialize Incremental at Prefix, pad to length 3 (change "index starts" and "step" if required);
3) Insert "RAW_" as Prefix.

Done smile

Offline

#3 2006-04-29 14:22

dmp
Member
Registered: 2006-04-28
Posts: 3

Re: help for renaming folders

Denis,

very cool...it works! Can I ask another question? I tried amending the scripts for time|date to give me the date a file was created as the suffix for a folder name, but came up with only a dec 30 1899 date which, fourtunetaly, pre-dates me by just under a Century. I can change the yymmdd format but not the date reference. Any guidence?

Thanks so much,
Dan

Offline

#4 2006-04-29 18:13

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: help for renaming folders

Ok, now FileModifiedTime and FileCreatedTime (functions from PascalScript) should work for folders as well smile

Try it from here: ReNamerBeta.zip

Offline

#5 2006-04-29 22:51

dmp
Member
Registered: 2006-04-28
Posts: 3

Re: help for renaming folders

:yes:perfect!! Thank you so much.

Offline

Board footer

Powered by FluxBB