Re: How to copy whole folders?



Of course I do not understand.
I understand that you do not understand what I want to do. :-)
1.
First of all your syntax is different than xcopy help shows:
xcopy source destination switches
Your syntax puts switches in front of source.
2.
To automate the process I do not want to write hardcoded path into my batch
file!!!!
I want just to move my batch file from one folder to another and run it
again without any changes done to the batch file.
I think it clears the things up.
Jack

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:uanIqWJzHHA.3448@xxxxxxxxxxxxxxxxxxxxxxx
Your Question #1: I gave you this example in my first reply:

xcopy /s /c /d /y "c:\Documents and Settings\Jack\My Documents"
"U:\Backup\"

It clearly shows the source folder name (C:\Documents . . .) and
the target folder name ("U:\Backup"). What is it that you do not
understand?

Your Question #2: It is not possible to get xcopy to stop on
and error, then restart later on. However, you can document
the copy process like so:

xcopy /s /c /d /y "c:\Documents and Settings\Jack\My Documents"
"U:\Backup\" 1>c:\copy.txt 2>&1

Note that this is one single long line. All messages, including any
error messages, will be logged in the file c:\copy.txt.


"Jack" <replyto@it> wrote in message
news:e2F1mAJzHHA.484@xxxxxxxxxxxxxxxxxxxxxxx
Thank you for your comments.
Sorry, if I give you such impression, it was not my intent.
Still I see some issues I do not know how to solve it. It was long time
ago I created a batch file (during DOS era :-)
1.
When using batch file, how to specify:
local folder (where the batch file resides) as a source
and the destination folder to have the same name as a source folder
following the fixed path,
for example: c:\Backup\<here source folder title>
?
2.
I do not want xcopy to supress the error. I want xcopy to stop it on
error and restart the same xcopy command until all files are copied.

Thanks,
Jack

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:eFfs3AIzHHA.312@xxxxxxxxxxxxxxxxxxxxxxx

"Jack" <replyto@it> wrote in message
news:O2nwkxHzHHA.4276@xxxxxxxxxxxxxxxxxxxxxxx
In other words:
When using Windows 'Copy' and there is a duplicate file in destination
Windows ask the question:

This is why I recommended the /y switch.

"Overwrite....? I would like to have an option answering "No to All"
and Windows continue copying files but not quitting copying process as
it is doing right now.
Jack

I am getting the impression that you completely ignored the
advice I gave you in my first reply. Unless you spend the
time to try the command I gave you, you have to spend a
lot of time with repetitive copy commands. The choice is yours.


"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:eOyLKlCzHHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
"Jack" <replyto@it> wrote in message
news:ea1ewoAzHHA.3536@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
It must be a simple solution but I do not know how to do it.
When copying full folders (with subfolders) from one harddrive into
another
hardrive and during copying there is an error stoping the the copy
process
let say 70% files were copied.
What is the best way to copy the remaining files? I do not think,
checking
each subfolders for missing files is the best solution.
Thanks,
Jack


Use xcopy.exe from the Command Prompt. Example:

xcopy /s /c /d /y "c:\Documents and Settings\Jack\My Documents"
"U:\Backup\"

Type xcopy /? at the Command Prompt to see the meaning
of the various switches.











.



Relevant Pages

  • Re: USB drive problem
    ... Once per month I update the files using a batch file ... using this context for the copy command: ... that folder. ... The first problem I see is that there is no U or S switch for COPY. ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Ways to get a Directory Listing in a Text File, or Printed out - Re: Web site directories
    ... Use the CD Command, in a Command Prompt Window ... That doesn't specify a folder, just changes to the specified folder, ... if yo ucall up a Script (or Batch File) by using the *RightClick* ...
    (uk.people.silversurfers)
  • Re: Problem with Xcopy
    ... `xcopy' is not recognized as an internal or external command, ... the batch file has just some lines of command all like the following ... does xcopy not work any more with windows XP? ... command resides and [folder] is the name of the folder or directory. ...
    (microsoft.public.windowsxp.general)
  • Re: XCopy Exclude Function NOT Working
    ... folder that I would like to exclude. ... some other Xcopy command as well the trouble command line follows along ... with the contents of the exclude file list. ... Batch file command: ...
    (microsoft.public.windowsxp.general)
  • Re: Mass copy of files: how to?
    ... Avoiding "command lines" means that you have to perform the ... suggest a reliable batch file solution based on robocopy.exe. ... (which would be nice when using the Task Scheduler). ... A VERY brief tutorial on how to do this - use a batch file where you redirect the output to log files - for example, even using xcopy right now, you can simply append "output.log 2>&1" and "see" all that you would see if you run the command manually. ...
    (microsoft.public.windows.server.general)