bat file and spaces in folders

  • Thread starter Thread starter Nicholas Hall
  • Start date Start date
N

Nicholas Hall

I have created a bat that uses xcopy to backup files from my document. One
thing though is I can not work out what I need to add to the bat file so I
can copy stuff from folders with gaps in the name IE: test site.
Can anyone help me.
A big thank you in advance.

NIK
 
A big thank you isn't enough. If you come to the pub on the corner within 10 minutes and buy me 2 beers I'll tell you now, Deal?

"c:\my folder"

with the inverted commas.
 
You didn't turn up. Last time I help you.

--
----------------------------------------------------------
And the band played ....
http://www.livejournal.com/users/aldon/74121.html
A big thank you isn't enough. If you come to the pub on the corner within 10 minutes and buy me 2 beers I'll tell you now, Deal?

"c:\my folder"

with the inverted commas.
 
I have created a bat that uses xcopy to backup files from my document. One
thing though is I can not work out what I need to add to the bat file so I
can copy stuff from folders with gaps in the name IE: test site.
Can anyone help me.

Two methods...
1. enclose the directory and/or file names in quotes, ie: "test site"
instead of test site
2. use the dos 8.3 naming convention that uses ~ character to signify long
filenames

Method 1 is more compatible and to be honest, easier.
Method 2 will work except that it truncates the long filename to the ~
encoded name you use, ie "test site" would literally be copied as "testsi~1"
A big thank you in advance.

Glad to be of service
 
Foster's: Australian for Beer ;)

--
Ramesh - Microsoft MVP
Windows XP Shell
http://www.mvps.org/sramesh2k
---------------------------------------
What You Should Know About the Sasser Worm and It Variants:
http://www.microsoft.com/security/incident/sasser.asp
---------------------------------------


A big thank you isn't enough. If you come to the pub on the corner within 10 minutes and buy me 2 beers I'll tell you now, Deal?

"c:\my folder"

with the inverted commas.
 
David as I can not make to your pub could I send you a pint vie email ???

What you said did the trick.

"BIG thanks"

NIK

A big thank you isn't enough. If you come to the pub on the corner within 10
minutes and buy me 2 beers I'll tell you now, Deal?

"c:\my folder"

with the inverted commas.
 
As long as it's not fosters. That's another state's beer and now is for foreigners only.

We drink Tooheys round here. Up north they drink XXXX cos none of em can read. Down south they used to drink Fosters till it went international. Now they drink it's stablemate Victoria Bitter.
--
----------------------------------------------------------
And the band played ....
http://www.livejournal.com/users/aldon/74121.html
niknik1971 said:
David as I can not make to your pub could I send you a pint vie email ???

What you said did the trick.

"BIG thanks"

NIK

A big thank you isn't enough. If you come to the pub on the corner within 10
minutes and buy me 2 beers I'll tell you now, Deal?

"c:\my folder"

with the inverted commas.
 
Mine is last, but 1 in "Entries from 2004"
http://www.homebrewandbeer.com/beeroftheyear.html#2003
Bottle: around Rs.100 (arnd USD 2) in India.

--
Ramesh - Microsoft MVP
Windows XP Shell
http://www.mvps.org/sramesh2k
---------------------------------------
What You Should Know About the Sasser Worm and It Variants:
http://www.microsoft.com/security/incident/sasser.asp
---------------------------------------


As long as it's not fosters. That's another state's beer and now is for foreigners only.

We drink Tooheys round here. Up north they drink XXXX cos none of em can read. Down south they used to drink Fosters till it went international. Now they drink it's stablemate Victoria Bitter.
 
I'll let on. If I drink I drink Champagne. Although this last summer I had a few bottles of various bitters or ice filtered beer (whatever the hell this new invention is) for the first time in a few years cause I wanted to know what all these new beers were like.

--
----------------------------------------------------------
And the band played ....
http://www.livejournal.com/users/aldon/74121.html
Mine is last, but 1 in "Entries from 2004"
http://www.homebrewandbeer.com/beeroftheyear.html#2003
Bottle: around Rs.100 (arnd USD 2) in India.

--
Ramesh - Microsoft MVP
Windows XP Shell
http://www.mvps.org/sramesh2k
---------------------------------------
What You Should Know About the Sasser Worm and It Variants:
http://www.microsoft.com/security/incident/sasser.asp
---------------------------------------


As long as it's not fosters. That's another state's beer and now is for foreigners only.

We drink Tooheys round here. Up north they drink XXXX cos none of em can read. Down south they used to drink Fosters till it went international. Now they drink it's stablemate Victoria Bitter.
 
Back
Top