Forum Home
Press F1
 
Thread ID: 44744 2004-04-29 02:33:00 Batch file help please John W (523) Press F1
Post ID Timestamp Content User
232835 2004-04-29 02:33:00 For the life of me, I cant write a batch file to transfer a file from C:\Program Files\Hanatech\Host-Pro\Data*.* to C:\1cmr

Ive tried every variation I can think of with commas, capitals & lower case, still wont work.

Any help greatefuly accepted.

Thanks John.
John W (523)
232836 2004-04-29 02:41:00 Can you tell us what you have so far John. I would have thought something like this would do it

cd C:\Program Files\Hanatech\Host-Pro\Data\
copy *.* C:\1cmr

but I could be wrong.

B.
Barnabas (4562)
232837 2004-04-29 02:47:00 Try this:

I have shown a space as <space> for clarity. This forum software may insert one where I have not put one, so ignore any spaces not shawn so.

xcopy<space> C:\"Program Files"\Hanatech\Host-Pro\Data <space>*.* <space> C:\1cmr\<space>*.*

case insensitive by the way, and if you want to backup changed files only, and all subdirectories, use the switches thus at the end of the line:
<space>/y/d/s
godfather (25)
232838 2004-04-29 02:48:00 typo: *not shown so*
shawn suggests I was watching Shrek get sheared.
godfather (25)
232839 2004-04-29 02:55:00 The space in "Program Files" is what DOS coughs on. It sees the "Program" and takes that as a token. The problem is avoided by using the quotes ... copy "C:\Program Files\Hanatach\Host-pro\Data"\*.* c:\1cmr should do the job. Case doesn't matter. The "-" might be legal or not --- I forget, but quoting the whole path will get around that too. I'd normally use xcopy rather than copy. Graham L (2)
232840 2004-04-29 03:54:00 > typo: *not shown so*
> shawn suggests I was watching Shrek get sheared.

And weren't you?

Poor thing (www.nzherald.co.nz), he looks rather pathetic now. :D

They are going to give him a nice knitted jacket to wear until his own can grow back a bit aren't they?
Fire-and-Ice (3910)
1