to open file in external hard drive
Posted: 29 Nov 2011 03:04
How to writhe simple batch file with option:1 to open folder and text file in external hard drive, and if the drive not found, option:2 to close the process.
A Forum all about DOS Batch
https://www.dostips.com/forum/
Code: Select all
if exist "F:\" (explorer "F:\"¬epad "F:\myfile.txt") else exit/b
Code: Select all
set drive=F
if exist "%drive%:\" (explorer "%drive%:\"¬epad "%drive%:\myfile.txt") else exit/b