Commandline SetWorkingFolder Fails with root Working Folder

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
wkrzystek
Posts: 33
Joined: Mon May 15, 2006 11:25 am

Commandline SetWorkingFolder Fails with root Working Folder

Post by wkrzystek » Mon May 21, 2007 12:56 pm

In our vault repository, there is a repository folder ($/LOCAL) that has a working folder that is the root folder of a drive letter, in this case is "H:\".

The command line client returns an unspecified error trying to set the working folder if there is a trailing backslash in the working folder value.
  • C:\Program Files\SourceGear\Vault Client>vault SETWORKINGFOLDER "$/LOCAL/" "H:\" -repository "Repository Name" -user MyUser -password MyPwd -host MyServer
    <vault>
    <error>
    usage: SETWORKINGFOLDER repository_folder local_folder
    </error>
    <result success="no" />
    </vault>
If I remove the trailing backslash, the command succeeds but now my subfolders all have invalid paths, ie. H:PROJECTS
  • C:\Program Files\SourceGear\Vault Client>vault SETWORKINGFOLDER "$/LOCAL/" "H:" -repository "Repository Name" -user MyUser -password MyPwd -host MyServer
    <vault>
    <listworkingfolders>
    <workingfolder reposfolder="$/LOCAL" localfolder="H:" />
    </listworkingfolders>
    <result success="yes" />
    </vault>
I can set the working folder properly to H:\ in the GUI but I can't seem to make this work with the commandline. I'm using version 3.5.2 (5087). Thanks.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Mon May 21, 2007 1:57 pm

You've quoted the ending quote character, so you're trying to set your working folder to
H:" -repository

Try this:

vault SETWORKINGFOLDER "$/LOCAL/" "H:\\"

wkrzystek
Posts: 33
Joined: Mon May 15, 2006 11:25 am

Post by wkrzystek » Mon May 21, 2007 2:35 pm

Thanks Greg. I had already tried the double slashes to no avail but your post got me thinking and I was able to make it work by simply ignoring the quotes around the working folder entirely unless there is a space in my working folder (in which case its not a root folder anyways).

I was able to get this command to work for me:
  • C:\Program Files\SourceGear\Vault Client>vault SETWORKINGFOLDER "$/LOCAL/" H:\ -repository "Repository Name" -user MyUser -password MyPwd -host MyServer
    <vault>
    <listworkingfolders>
    <workingfolder reposfolder="$/LOCAL" localfolder="H:\" />
    </listworkingfolders>
    <result success="yes" />
    </vault>

Post Reply