On 2014-09-05 22:37, Simone Agha wrote:
> Hi,
>
> I'm having trouble un-adding a directory (recursively) that has spaces in its name. I am doing this on Windows 8.1 through a batch script. An example of my code is below:
>
> set PATHWSPACES=%CD%
> svn add "PATHWSPACES"\subdir1\
> svn revert "PATHWSPACES"\subdir1\subdir2\ --recursive
>
> When I run the batch script, the files are added correctly, but I get this line when the directory is supposed to be reverted:
>
> Skipped 'C:\Path with spaces\subdir1\subdir2'
>
> Setting the PATHWSPACES variable using quotes of any kind does not work. However, what does work is typing out the complete path which is not feasible for what I'm trying to do with the batch script. So, this works:
>
> Set PATHWSPACES=%CD%
> svn add "PATHWSPACES"\subdir1\
> svn revert "C:\Path with spaces\subdir1\subdir2\" --recursive
>
> Putting quotes around the entire path or putting quotes around the variable and the entire path also does not work. I get the following messages:
> For code that is: svn revert "PATHWSPACES\subdir1\subdir2" --recursive
> svn: E155007: 'C:Path' is not a working copy
> For code that is: svn revert ""PATHWSPACES"\subdir1\subdir2\" --recursive
> Skipped 'C:\Path with spaces\subdir1\subdir2" -recursive'
>
> Help! What is going on? Unfortunately, I can't change to a path name without spaces.
>
I can think about two solutions
1) instead using "PATHWSPACES"\subdir1\ use "PATHWSPACES\subdir1\"
2) cd "PATHWSPACES\subdir1\" && svn revert -R
Even windows self has today issues with masking spaces in the path, you will find x samples with quoted paths in the registry or on technet.
Not exactly your issue but describes how to use cmd and quotes http://technet.microsoft.com/en-us/library/cc771320.aspx
Received on 2014-09-05 23:45:16 CEST