## How to open a file on a network drive using batch file?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
data808
Posts: 5
Joined: 19 Jul 2012 01:49

### How to open a file on a network drive using batch file?

Right now I have an excel file that I want to open with a batch file. The excel file name is:

JK Counter Log.xls

start /d "K: blahblahblah" JK Counter Log.xls
and
start EXCEL.EXE "K: blahblahblah\JK Counter Log.xls"

says something like it can't find "JK" make sure you are typing it out correctly.

any help will be appreciated. thanks.

Squashman
Expert
Posts: 3666
Joined: 23 Dec 2011 13:59

### Re: How to open a file on a network drive using batch file?

Might help if you put a Back Slash after your drive letter.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

### Re: How to open a file on a network drive using batch file?

You need the correct path, and the two empty quotes at the start.

Code: Select all

``start "" "K:\blah1\blah2\blah3\JK Counter Log.xls"``

This may also work.

Code: Select all

``start "" "\\server\share\JK Counter Log.xls"``