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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

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

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

#1 Post by data808 » 19 Jul 2012 02:00

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

I already tried:

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?

#2 Post by Squashman » 19 Jul 2012 06:20

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?

#3 Post by foxidrive » 19 Jul 2012 10:32

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"

Post Reply