Solved

start UNC path with spaces

Posted on 2011-02-19
5
876 Views
Last Modified: 2012-05-11
I want to use a batch file as per the code below however it does not like the spaces. I dont really want to rename the paths or start creating shares to avoid the file paths.

 
start "\\Computer1\DirectoryOne\Subdirectory\fileone directory"

Open in new window

0
Comment
Question by:SickBoy23
5 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34932663
the line does not show the batch file name (aka the extension .bat) ?
please clarify
0
 
LVL 4

Expert Comment

by:mansmanf
ID: 34932727
last word should be the target file (executable) with .bat or .cmd
0
 
LVL 3

Assisted Solution

by:OrenRozen
OrenRozen earned 110 total points
ID: 34932773
the following line will start the iexplore using the exe file on the remote machine.

start "remote browser" /D "\\192.168.1.11\c$\Program Files\Internet Explorer\" "\\192.168.1.11\c$\Program Files\Internet Explorer\iexplore"

The "remote browser" wont show in any window and you can replace it with ""
0
 
LVL 83

Accepted Solution

by:
oBdA earned 140 total points
ID: 34932852
There's probably a command prompt popping up? This is an issue with the "start" command line. According to the syntax, the "title" argument (which only applies to command prompts anyway) is optional--well, it isn't if the program you want to start needs to be enclosed in quotes. "start" always treats the first argument enclosed in quotes as "Title", and then (when it can't find a program to start in the command line anymore, because it considers the program to be the title) opens a command prompt with this title. In other words: you have to add a dummy title (enclosed in quotes as well) if you want to start a program enclosed in quotes using "start":
start "" "\\Computer1\DirectoryOne\Subdirectory\fileone directory"

Open in new window

0
 

Author Closing Comment

by:SickBoy23
ID: 34934434
Thanks guys!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now