ZTree.com  | ZEN  | About...  

 Index   Back

[Comment] target directory names containing spaces.   [Comment]

By: Ben Kent       
Date: Apr 30,2024 at 19:51
In Response to: [Comment] target directory names containing spaces. (wpeluso)

> > > It's me again.
> > >
> > > Probably a previously reported anomaly, but Ztree will not get you
> to
> > > directories with a space in their name. See example below.
> >
> > This is just down to the way most/all windows software parses
> > command-line arguments/parameters. Parameters are separated by spaces
> so
> > if you want to pass in a path that contains a space you have to
> enclose
> > it in double-quotes:
> >
> >
> > C:/Windows/System32/conhost.exe c:/ztree_211/ZTW64.EXE
> > "c:/users/airch/Documents/A CONDO"
> >
> > Your backslashes were removed by the forum software so I've tried to
> > use forward-slashes above? Might work, but you'll have to convert
> them
> > back to backslashes of course :)
>
>
> I might not have been clear previously. Let me start again:
>
> The following samples are what I place into the target of a desktop
> shortstop (a .lnk file) to have ztree get me to the indicated directory.
>
> The directory name with the space doesn't work, the other does.
>
> C:\Windows\System32\conhost.exe c:\ztree_211\ZTW64.EXE
> c:\users\airch\Documents\a condo\
>
> C:\Windows\System32\conhost.exe c:\ztree_211\ZTW64.EXE
> c:\users\airch\Documents\a_condo\
>
> Also, why does the forum sw remove the backslashes from my text from
> the samples above?
>
> Thanks

As Andrew stated, commandline options with spaces and some special characters need to be quoted, that is true for most applications on Windows and Unix.

Also bacause of the API that ZTree uses to parse the commandline, trailing backslashes need special handlng, either drop if you can, or double backslash, i.e. use one of these

C:\Windows\System32\conhost.exe c:\ztree_211\ZTW64.EXE "c:\users\airch\Documents\a condo\\"

C:\Windows\System32\conhost.exe c:\ztree_211\ZTW64.EXE "c:\users\airch\Documents\a condo"

The other way to achieve the same thing is to drop the path from the commandline and set it in the working directory (start in) of the shortcut.

Ben

89 views      
 

Messages in this Thread

 
96,656 Postings in 12,233 Threads, 350 registered users, 28 users online (1 registered, 27 guests)
Index | Admin contact |   Forum Time: May 18, 2024 - 12:58 pm UTC  |  Hits:63,519,259  (3,963 Today )
RSS Feed