TechSpot

Creating Batch File to search destination

By Knifeboy426
Jun 5, 2009
Topic Status:
Not open for further replies.
  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.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.