Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch file help
Name: Shay Harel Date: August 6, 2003 at 12:43:05 Pacific OS: 2000 CPU/Ram: P5 256
Comment:
Hi,
I was looking for some DOS help on something that looks simple but I just cant figure it out
I use a batch command like this for %%i(in %1.a %1.b) type%1>>%1.y
which will add the *a and *.b to a *.y file Now, if I want to write in the Y file the name of the file I inserted before I insert it, how do I do it ?
To explain i details: Let's say I have a file me.a that contains the string "123" and a file "me.b" that contains the string "456", I want the me.y to look like that me.a 123 me.b 456
Name: Secret_Doom Date: August 6, 2003 at 21:02:30 Pacific
Reply:
The filename would be defined by %1, is that it? I mean, if the batch file is invoked with the first parameter as "hello", hello.a and hello.b will be 'logged' into hello.y, no other files, right? You mentioned "*.a and *.b", which was confusing...
This will do it:
for %%F in (%1.a %1.b) do ( echo %%F>> %1.y type %%F>> %1.y )
Summary: iam trying to make a batch file so that it copies some dll files from the cdrom from to the system directory. since the cdrom drive letter may vary in different systems iam trying to accept an input ...
Summary: Can anyone help me with this problem i am having. I am trying to get this stupid Batch file to work on an NT machine. How do I make an enviromental variable = to the contents of a text file? Thanks fo...
Summary: Comment: hey every one , I would like to create a batch file that will do the following: when i start a computer for new install i want the batch file to see if there is c, b, d, f, h, drived and so ...