Solved

start UNC path with spaces

Posted on 2011-02-19
5
902 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 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 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 84

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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