TechSpot

Creating Batch File to search destination

By Knifeboy426
Jun 5, 2009
  1. I am trying to create a batch file to expand a file as another. This part I have done, but I need to run this from a usb drive. So the source directory will change from computer to computer This is what I have so far :

    expand "K:\Computer Repair\Sound Button Fix\sndvol32.ex_" c:\windows\system32\dllcache\sndvol32.exe

    expand "K:\Computer Repair\Sound Button Fix\sndvol32.ex_" c:\windows\system32\sndvol32.exe







    I want something along this line, but from usb:

    @echo off for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%a:\drive.txt set CDROM=%%a:

    expand "%CDROM%\Computer Repair\Sound Button Fix\sndvol32.ex_" c:\windows\system32\dllcache\sndvol32.exe

    expand "%CDROM%\Computer Repair\Sound Button Fix\sndvol32.ex_" c:\windows\system32\sndvol32.exe
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...