Computing.Net > Forums > Disk Operating System > dos batch variable name

dos batch variable name

Reply to Message Icon

Original Message
Name: Robyn O
Date: September 30, 2001 at 08:46:17 Pacific
Subject: dos batch variable name
Comment:

I am trying to script a program to write to a file with a variable name(AAmmddyy.dat). How can I use a .bat file to write to a variable file name, I can't find anything specific and I am so DOS rusty.


Report Offensive Message For Removal


Response Number 1
Name: Secret_Doom
Date: September 30, 2001 at 19:04:54 Pacific
Reply: (edit)

You mean getting the variable value and using it to name the file?

ren whatever.wtv %variable*

or, if the variable doesn't contain the extention:

ren whatever.wtv %variable%.abc

-- Secret_Doom --

secret_doom@hotmail.com
batch.hpg.com.br


Report Offensive Follow Up For Removal

Response Number 2
Name: Laurence
Date: October 8, 2001 at 23:42:35 Pacific
Reply: (edit)

Batfiles: The DOS batch file programming handbook

Use,

ECHO text>%AAmmddyy.dat%

TYPE filename>%AAmmddyy.dat%

COPY filename %AAmmddyy.dat%


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 batch variable name

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 6 Days.
Discuss in The Lounge