Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Copy A file + Append Date to that file

Avatar of softbless
softbless asked on
Windows Batch
3 Comments1 Solution661 ViewsLast Modified:
Dear All,

I need a bat file for this :

I have a folder that contain several files, for example Folder A with 3 files : Susan.log, Mitch.log, Bryan.log. OS : Windows XP

I want to copy those 3 files to folder B, but I need when copied the file name will append date time with format : yyyymmdd. With the yyyymmdd is fetched from the modified date of those 3 files.

File in Source Folder         Modified Date               The result of copy in Folder B
=================        ==============         =============================
Susan.log                           23-March-2010            Susan-20100323.log
Mitch.log                             18-Dec-2009                Mitch-20091218.log
Bryan.log                            7-Dec-2008                 Bryan-20081207.log

Please give me the bat file for these results : copy files from folder A to Folder B, with the files name including the modified date of the corresponding files.
Avatar of Farhan Kazi
Farhan KaziFlag of Australia imageSystems Engineer
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers