Computing.Net > Forums > Programming > Dos Copy w/ Date in Filename ??

Dos Copy w/ Date in Filename ??

Reply to Message Icon

Original Message
Name: Michael McKenzie
Date: October 24, 2002 at 08:25:26 Pacific
Subject: Dos Copy w/ Date in Filename ??
OS: XP
CPU/Ram: 512 MB Ram
Comment:

I am looking for a simple dos/bat programming script that will copy all (*.*) the files and back them up to another directory WHILE adding the DATE in the file name.

So if c:\jobs has files "outstanding.txt" and "reports.txt" how would I copy those over to c:\backup with new file names "outstanding_10-24-2002.txt" and "reprots_10-24-2002.txt" ??

ADV(thanks)ANCE ~! :)

- Michael


Report Offensive Message For Removal


Response Number 1
Name: Burbble
Date: October 24, 2002 at 10:19:11 Pacific
Reply: (edit)

Report Offensive Follow Up For Removal

Response Number 2
Name: Michael McKenzie
Date: October 24, 2002 at 12:00:23 Pacific
Reply: (edit)

The link is definitely a good resource, but doesn't answer my question. I am trying to copy files from one location to another AND renaming the file to include the DATE... so it would be filenameDATE.doc but in grabbind a %date% value in DOS it uses the "/" which is not a proper filename character... Is there anyway to put the date in another format? or write it to a file and then remove the /'s and THEN make it a filename ?

Any help would be greatly appreciated.

- Michael


Report Offensive Follow Up For Removal

Response Number 3
Name: Burbble
Date: October 24, 2002 at 14:38:16 Pacific
Reply: (edit)

Ah, here's the link I was looking for!

http://www.batch.hpg.ig.com.br/index.htm

Specifically number 2 or number 5.

-Burbble


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Dos Copy w/ Date in Filename ??

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge