Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 939
  • Last Modified:

start UNC path with spaces

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
SickBoy23
Asked:
SickBoy23
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the line does not show the batch file name (aka the extension .bat) ?
please clarify
0
 
Fridolin MansmannMaster of Business Engineering ManagementCommented:
last word should be the target file (executable) with .bat or .cmd
0
 
OrenRozenCommented:
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
 
oBdACommented:
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
 
SickBoy23Author Commented:
Thanks guys!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now