Batch scripting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I like to rename a file with a new filename and today's date appended to it
in my batch file

Thanks,
Hamid
 
Hamid Ozair said:
Hi,

I like to rename a file with a new filename and today's date appended to it
in my batch file

Thanks,
Hamid

Try this:
@echo off
ren "My File.txt" "My File %date:/=-%.txt"
 
Thanks Pegasus. It worked. I also puts day of the week which I don't want but
I can live with it.

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top