tags:

views:

78

answers:

3

I have an unversioned folder "Data Files" in D:\test\prototype\AtlasTools\Transforms\SxS\src\ folder.
I need to add these folder using commandline.
I used the following code to add

for /f "usebackq tokens=2*" %i in (`svn status ^| findstr /r "^\?"`) do svn add "%i"

But it is showing error like "SxS\src\Data cannot be found. Actually my folder name is "Data Files" .

can anyone help me to add a folder having space in it?

it's urgent..

A: 

Escape the space with a backslash.

or

If you want a directory with a name that has a space in it, such as "My Files" you need include the command in " ".

rahul
how can i escape the space in for /f "usebackq tokens=2*" %i in (svn status ^| findstr /r "^\?") do svn add "%i"i am new to this type area....
+1  A: 

Does it work if you enclose the folder name in quotes? (that's the entire pathname including the folder)

Apart from that, I tend to agree with Stephen C that spaces in folder names will, sooner or later, come back and bite you.

pavium
ya ,it will work if i enclose with in quotes.
Great! So when the time comes to accept an answer, you'll know what to do, won't you? ;-D
pavium
A: 

hey guys

for /f "usebackq tokens=2*" %i in (svn status ^| findstr /r "^\?") do svn add "%i %j"

this is the solution for this...

but it is not working from batch file