Batch Files in Win XP

G

Guest

I am trying to write a batch file for use in Windows XP.
Here is what I have now:

CD\
CD..
cd Temp Data Files
cd Raw Data
del lexall
del lexall.out
rename lexall.txt lexall.
9005LEX.EXE

I need to change the lexall.txt file name to include a user variable:

1234567_lexall.txt

The Number 1234567 needs to be input by the user every time.
Does anybody have any ideas?

Any and all suggstions will be welcome.
 
P

Poprivet

VexedFist said:
I am trying to write a batch file for use in Windows XP.
Here is what I have now:

CD\
CD.. NOT NEEDED
cd Temp Data Files OK, just add quotes and the full path. e.g.
cd X:\"temp data files".
In fact, the two lines could be written as
cd X:\"temp data files\raw data"
Where, of course, X is the drive letter.
cd Raw Data CAN BE COMBINED AS ABOVE.
del lexall
del lexall.out
rename lexall.txt lexall.
9005LEX.EXE

I need to change the lexall.txt file name to include a user variable:

1234567_lexall.txt

The Number 1234567 needs to be input by the user every time.
Does anybody have any ideas?

Any and all suggstions will be welcome.

It's all pretty basic; there are many batch tutorials around the 'net;
search for them. Almost all you need will be in the beginning basics. IIRC
allenware.com was a good one and started with the very basics and went from
there.

I didn't finish the batch file for you because without understanding what
it does, you'll never make good use of it or even find a typo if you make
one.

HTH
Pop`
 
S

Stan Brown

Fri, 18 May 2007 07:47:00 -0700 from VexedFist
Here is what I have now:

CD\
CD..

I don't know what you're trying to do, but the above can't *possibly*
accomplish it.

"CD \" transfers to the root directory of the current disk.

"CD .." transfers one level above the current directory.

But the root directory is the root -- there's nothing above it. Hence
"CD .." in that context is meaningless.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top