Page 1 of 1

insert text to rename files

Posted: 08 Feb 2011 04:35
by accessbeginer
Hi Guys,

I am very very new to batch files, so any help is appreciated.

I have a number of weekly files (20 in total) that are downloaded into separate folders. Each file is named with a date ( #yymmdd.txt), every file is called exactly the same and the only way to distinguish them ( besides size) is to locate them in appropriately but differently named folders.

Is there a way to insert a more meaningful name before the #yymmdd? The #yymmdd will change for each week.

I know there are some programs out there, that can rename files for you, but going into each folder and selecting the files to rename, is getting tedious, plus the volume of files is likely to increase in the future.

All the folders will be located on one directory ie: C:\test\folder1 C:\test\folder2 etc.

Hoping you guys can help.

Thanks

Re: insert text to rename files

Posted: 08 Feb 2011 10:01
by ChickenSoup
Could you give a bit of a sample set of the files, the folder structure they are in, and how you would want them to look / be named? I'm not sure which way to go and am not sure on the exact source.

Tip: "dir /b /s" of the directory in question will give a structure of the folders and files.

Re: insert text to rename files

Posted: 19 Feb 2011 19:36
by accessbeginer
Sorry for the delay ins responding, I have been on leave and traveling. Thanks ChickenSoup, but a friend has solved this little problem for me while on was on leave.