Computer Hope

Microsoft => Microsoft DOS => Topic started by: diarmuid on February 11, 2009, 10:02:00 AM

Title: Xcopy help please
Post 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 :)
Title: Re: Xcopy help please
Post by: GuruGary on February 11, 2009, 11:41:29 AM
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:
Code: [Select]
xcopy.exe "W:\*.pdf" "\\ctbfps003\departmental\pmccad\removed\today\" /S /F
Title: Re: Xcopy help please
Post by: Geek-9pm on February 11, 2009, 11:47:25 AM
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.
Title: Re: Xcopy help please
Post by: diarmuid on February 12, 2009, 08:24:44 AM
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

Title: Re: Xcopy help please
Post by: Geek-9pm on February 12, 2009, 09:13:03 AM
Code: [Select]
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:

Code: [Select]
Xcopy w:*.pdf X: /s /f /z
 


Title: Re: Xcopy help please
Post by: GuruGary on February 12, 2009, 10:23:38 AM
Do you get any errors or other messages during the copy process?  It sounds like there may be permission issues.  Try this:
Code: [Select]
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.