Discussion Locked

Batch file commands

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am attempting to create a MS-DOS batch file that will rename a file in a folder and move to a new location. Moving the file and renmaing is causing no problems. However I would like to be able to rename the files incremently so that each file is stored with either its date and time or a number.

What command or script can be used for this?

1 reply

by ozi eagle

Hi,
I have written a small .exe program that creates the time and date and "forwards" it to a batch file for use.
It is in the format ymmddhmm, as I have found that many files dated in this way are much easier to sort and find than by ddmmyy. If you wish a copy, post a comment or reply to this question, and I will forward to your email address.

NOTE: that if you use batch files then you are in MSDOS mode and your file name length may be limited to eight characters. Check ways of using long files names.

This discussion is closed to new replies.