?
Solved

start UNC path with spaces

Posted on 2011-02-19
5
Medium Priority
?
926 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 143

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 5

Expert Comment

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

Assisted Solution

by:OrenRozen
OrenRozen earned 440 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 85

Accepted Solution

by:
oBdA earned 560 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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