This copy command
COPY FILE "M:\TEST" TO "X:\GRMS01\TEST" COPYDIRTIMES=yes COPYFILETIMES=yes COPYATTR=yes NONBUFIO=yes FORCE UPDATEALL WHENEXISTS=replacenewer
creates the directory
X:\GRMS01\TEST\TEST
=> That is not that what I await!
When I run the DOS copy command:
copy M:\TEST X:\GRMS01\TEST
I get the file
X:\GRMS01\TEST\blabla.txt
and not the directory
X:\GRMS01\TEST\TEST
and file
X:\GRMS01\TEST\TEST\blabla.txt
MrC
June 26, 2013, 8:40pm
2
Maybe: WHENEXISTS=replacenewer,merge
(untested)
Jon
June 26, 2013, 9:06pm
3
Change TO to take out the \Test.
Thanks,
I'm just using this:
COPY FILE "M:\TEST*" TO "X:\GRMS01\TEST" COPYDIRTIMES=yes COPYFILETIMES=yes COPYATTR=yes NONBUFIO=yes FORCE UPDATEALL WHENEXISTS=replacenewer
("M:\TEST*" instead of "M:\TEST")
and it works.
If this might not be correct (take out "\Test" might be more correct?) - please let me know.
THANKS
Leo
June 26, 2013, 10:19pm
5
Either is fine.
You want to do either of these:
[ul][li]Copy M:\Test to X:\GRMS01[/li]
[li]Copy everything below M:\Test to X:\GRMS01\Test[/li][/ul]
One command does one, the other does the other. If X:\GRMS01\Test already exists then there isn't much difference between the two. If it may not exist, then you want the one Jon suggested.
MrC
June 26, 2013, 10:30pm
6
Does the wildcard run the risk of exceeding an argument or command line limit?
Leo
June 26, 2013, 11:07pm
7
No, wildcards aren't expanded into huge command lines like with a Linux/Unix shell, if that's what you're thinking of.