appending date to downloaded files

  • Thread starter Thread starter ernie schulte
  • Start date Start date
E

ernie schulte

Every day i need to download about 20 datasets from
mainframe to my pc. I use an automated product supplied
by the s/w company who supply the application but it uses
windows conventions. As i need to keep the data for
several months i need to rename each file every day to
add the date to the filename. I cannot find anything in
Windows which could either do this as part of the
download or rename multiple files concurrently keeping
the original file prefix.
Has anyone alse come across this problem?
Regards...ernie
 
Hi,

I am not aware of a native windows function to do this but
here is a link for a scripting utility (costs $60) that i
have used for similar tasks.

I really recomend this product (and no, i have no link
whatsoever to the company) as it is powerful and easy to
use:

http://www.mjtnet.com/macro_scheduler.htm

Regards,

Tim
 
for /f %i in ('dir /b c:\king_marc') do echo %~ni_%var%_%
~xi
you can use this command first set a variable named var to
the date you want to add then execute the commandline.

if you use this line in a batch file you have to replace %
by %% but not around the %var%

greetz..
 
Back
Top