|
请自行做相应修改:FindAndRun.bat
- @echo off
- set File_Path_From_Root=\ghost.exe
- set Cmd_And_Param=ghost -nousb -clone,mode=load,src=HD4.gho,dst=1 -fx -rb
- :Find_Drive
- set DriveList=A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- set TheDrive=NotFound
- for %%i in (%DriveList%) do (
- if exist "%%i:%File_Path_From_Root%" set TheDrive=%%i&goto :Check_If_File_Availabe
- )
- :Check_If_File_Availabe
- if %TheDrive%==NotFound (echo %File_Path_From_Root% is not found!&goto :Exit) else (goto :RunTheFile)
- :RunTheFile
- set File_Full_Path=%TheDrive%:%File_Path_From_Root%
- for /f "delims=" %%i in ("%File_Full_Path%") do cd /d "%%~dpi"
- %Cmd_And_Param%
- goto EXIT
- :Exit
复制代码 |
|