Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening A Specific File With A Batch File?

I'm would like to know how I can open a specific file using a specific program with a batch file. So far, my batch file can open the program, but I'm not sure how to open a file with that program.

@echo off
start wgnuplot.exe
like image 266
sooprise Avatar asked Apr 07 '10 17:04

sooprise


2 Answers

start wgnplot.exe "c:\path to file to open\foo.dat"
like image 163
Chris Thornton Avatar answered Oct 11 '22 14:10

Chris Thornton


If the file that you want to open is in the same folder as your batch(.bat) file then you can simply try:

start filename.filetype

example: start image.png

like image 30
ASGeek Avatar answered Oct 11 '22 15:10

ASGeek