Creating Batch File to search destination

Status
Not open for further replies.
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
 
Status
Not open for further replies.
Back