Solved

start UNC path with spaces

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
avoiding the dashes in the sqlcmd output... 1 474
Batch file output 20 89
robocopy 6 63
Windows Batch File - Count Down 4 70
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…
Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 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