Running a batch file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SkySea@aol.com

    Running a batch file

    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:

    /install.html
    /<Patches>
    /copier.bat
    /MFC42.DLL

    HTML entry:
    <a href="Patches/copier.bat">Cli ck here</a> to copy the MFC42.dll
    file to "C:\program&nbs p;files\pathfin der&nbsp;office ".

    Batch file:
    copy MFC42.DLL C:\progra~1\pat hfi~1
    exit

Working...