Computer Hope
Microsoft => Microsoft DOS => Topic started by: diarmuid on February 11, 2009, 10:02:00 AM
-
Below is a dos command i wish to run to basiclly copy all PDF documents on a server to another server in a another location. It's not working and i cannot understand why. both locations are server locations.
xcopy /s /f /z "w:\*.pdf" "\\ctbfps003\departmental\pmccad\removed\today\"
I would greatly apprciate and help on this matter
Regards
Diarmuid :)
-
When you say "It's not working" what do you mean? Do you get an error, or not get the expected results? Your command doesn't follow the proper syntax for XCOPY, but it still seems like it should work. Let's try correcting it just to be sure, so try:
xcopy.exe "W:\*.pdf" "\\ctbfps003\departmental\pmccad\removed\today\" /S /F
-
Do you first read all of this?
http://www.computerhope.com/search.htm?cx=003411668307610607965%3Ah4yba8pbdco&cof=FORID%3A9%3BNB%3A1&q=XCopy&sa=Search#1256
There must be over a hundred posts about how to use Xcopy.
-
Hi Guys, thanks for the replys.
Geek:
I did a on search xcopy but there was nothing that was explaining where i was going wrong.
GuruGary:
I used the mods you showed me. it copied one directory. That directory didn't have any pdf's in it!!!!
using the line i orignally posted:
It looks like its working however it's not copying the files only some directories. These directories were empty when they were copied accross ???
Thanks for all the help
Diarmuid
-
Xopy /s /f /z "w:\*.pdf"
"\\ctbfps003\departmental\pmccad\removed\today\"
OK, Sorry you did not see it.
I broke code in two lines to make it clear what the problem is.
In the first line the quotes should not even be eemed.
The second line I am thinking you should mount that path a a volume or make it so that you do not need the quotes.
Lets mount it on, maybe X:
Switches follow.
Now it reduces to:
Xcopy w:*.pdf X: /s /f /z
-
Do you get any errors or other messages during the copy process? It sounds like there may be permission issues. Try this:
xcopy.exe "W:\*.pdf" "\\ctbfps003\departmental\pmccad\removed\today\" /S /F /C /H /D /Y
If that doesn't work, then check to be sure the account that is running the xcopy has read permissions on the files, and let us know what other messages you get when the command is run.