rename folder by having filename init - TechRepublic
Question
August 22, 2008 at 05:43 AM
barodian_da_dude

rename folder by having filename init

by barodian_da_dude . Updated 17 years, 11 months ago

hi,

i have made a DOS batch file which copies a date folder (like 08222008) into another server and makes a zip file on destination server (zip file from the copied folder 08222008 not the folder itself). The problem is i need to make a zip file on the basis of the name of file which are in the folder of date like 08222008. like

file name:- “Monday_log_08172008_4.log”

i have made the batch file which makes a zip file of the folder as:

Monday_log_08172008.zip

but don’t know how to make it as the file name as i shown above but i don’t know how to make it perfect is there any idea?

Please note that file name gets changed everyday like

Monday_log_08172008_19.log
Monday_log_08172008_440.log

so we daily need to rename it and make it a zip file of it.

your kind help is highly appreciated.

This discussion is locked

All Comments