Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set rootDir=%CD%
- echo Starting at "%rootDir%".
- set /p ans="Launch: "
- echo Searching for %ans%
- goto treeProcess
- :end
- cd %rootDir%
- exit
- :treeProcess
- ::search in current directory
- echo Searching in "%CD%".
- if exist "%ans%.lnk" (
- echo Found "%ans%.lnk"
- start "" "%ans%.lnk"
- goto end
- ) else if exist "%ans%.url" (
- echo Found "%ans%.url"
- start "" "%ans%.url"
- goto end
- )
- ::go to subfolders
- for /d %%d in (*) do (
- cd %%d
- call :treeProcess
- )
- echo "file not found!"
- cd %rootDir%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement