I can open an excel file from .bat by simply using the path of the file.
Is there a parameter to open the csv in edit mode (as notepad) ?
I can open an excel file from .bat by simply using the path of the file.
Is there a parameter to open the csv in edit mode (as notepad) ?
As Squashman mentioned in the comments, if you are just in the command prompt and need to edit any file, you can simply run notepad <filename>
. However, if you need this to be part of a larger batch file or want it to be in batch form for another reason, you can use the below example which does a couple notable things:
START
so that the batch file will exit/resume immediately. If you leave this out, the batch file will wait for you to close notepad.editfile.bat
@echo off set "f=%1" echo Opening %f% in notepad.exe START notepad %f%
Usage: editfile filename.csv
Obviously, it doesn't have to be a CSV file. It can be any file.