By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,666 Members | 1,909 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,666 IT Pros & Developers. It's quick & easy.

Running a batch file

P: n/a
Hi! Any help on this would be appreciated...

In an HTML document that lists instructions on installing some
software, there's a point where a DOS batch file needs to be run in
order to copy files from the CD to the hard drive. Given that CD
drives can have various names, I wanted to run the batch file using
relative paths.

The problem is, the DOS window that opens to run the batch file can
leave the command prompt at any location . So even though the batch
file can be called with a relative path, the batch runs from whatever
the current directory is when the DOS window opened, and "file not
found" is the predictable error.

Is it possible to use just the one HTML file to have the batch file
run from its own location (or is some scripting language required)?


Folder/file tree:


HTML entry:
<a href="Patches/copier.bat">Click here</a> to copy the MFC42.dll
file to "C:\program&nbsp;files\pathfinder&nbsp;office" .

Batch file:
copy MFC42.DLL C:\progra~1\pathfi~1

Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.