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.
giving a path to a batch file
Name: mfc_oracle Date: April 21, 2004 at 02:16:52 Pacific OS: DOS 6.2 or higher CPU/Ram: X86 family (Pentium II) 3
Comment:
I'd like to give a path to a batch file to copy some files in that path. Could you please let me know how can I do that? I've used the following but didn't work! copy c:\myfile.txt %1\myfile.txt
Name: uli_glueck Date: April 21, 2004 at 04:53:15 Pacific
Reply:
Hi Sheila
What is exactly in your variable? Do you just want to copy from one folder to another folder on the same drive? Give us a bit more information. Then it is easier to help.
uli
0
Response Number 2
Name: melee5 Date: April 21, 2004 at 22:07:06 Pacific
Reply:
Hoping that the basics are what you after here Shelia, you invoke the batch file with a command line entry and pass the path to it at the same time like:
yourbatch yourpath
%0=yourbatch %1=yourpath %2="" Then inside your batch file, this would work to copy c:\myfile.txt to yourpath\myfile.txt: copy c:\myfile.txt %1\myfile.txt
yourpath must start with drive letter and NOT end with backslash as you already have the backslash included in your example. Since you didn't change the name of the copied file during the copy process, this would also work with the same rules above: copy c:\myfile.txt %1
If this didn't get you going then give a few more details. I'm not even sure I'm answering your question here.
Summary: Hi guys. Do you know of a way to open an MS application from a batch file? (i.e. without giving direct path to .exe since this varies) Obviously just type 'winword' from the run line, yet this won'...
Summary: To Delete a dir and all contents ... deltree [drive:/path/dirtobedeleted] So you woulden't want to type something like c:>deltree c:\windows ;-) -------------------------------- To format a MASTER dri...
Summary: It has been a while for this so bare with me, but i believe that if you use a batch file to start an exe or another batch file, you have to use the "call" command, so that after the command is ran it ...