[analog-help] batch file code needed

Aengus analog07 at eircom.net
Thu Aug 23 10:40:23 PDT 2007


J. Gonzalez <jgtranscripts at gmail.com> wrote:
> I need to create a .bat file I am new to this.
>
> I am trying to change a file name to a file name dated as of the same
> date, e.g.  change from c:\fldra to c:\0823
>
> What is the code to do this? Thanks.

If you're using Windows, you can do something like this:

FOR /f "tokens=2,3 delims=/ " %f IN ('DATE /t') DO REN C:\fldra %f%g

type  FOR /?  at a command line for more details.

If you want to put this in a batch file, you'll need to double up % 
signs. And the command as written assumes US style dates (MM/DD/YYYY).

Aengus 




More information about the analog-help mailing list