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.
to open file in external hard drive
Moderator: DosItHelp
-
- Expert
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
- Contact:
Re: to open file in external hard drive
F = your drive letter.
Or for easier modification...
Code: Select all
if exist "F:\" (explorer "F:\"¬epad "F:\myfile.txt") else exit/b
Or for easier modification...
Code: Select all
set drive=F
if exist "%drive%:\" (explorer "%drive%:\"¬epad "%drive%:\myfile.txt") else exit/b
Re: to open file in external hard drive
Hi,
Thank you very much.
It is exactly what I need.
Thank you very much.
It is exactly what I need.