Copy entire directory

Started by fhammer, March 22, 2016, 11:34:24 PM

Previous topic - Next topic

fhammer

What is the best way to copy an entire directory (including all subdirectories and files)?

Thank you.

snowsnowsnow

XCOPY

Or, for the more industrious, you can Google, download, analyze, and deploy something called "XXCOPY".

JTaylor

Yes. XCOPY is a good option.  If you need a WinBatch solution for some reason there is one in the Tech Database.   Can't recall the best words to search on though to find it.     Maybe "File Copy Recursion" or some variation?

Jim

td

The Shell Operations extender's 'aFileCopy' is another option.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

morenos1

Sell Operations Extender "aFileCopy" function should do it .....

fhammer

Thanks for the responses. I think aFileCopy in the Shell Op extenter is probably what I need. I have installed it and am experimenting. However, I am having trouble understanding it and getting it to do what I want.

Maybe someone could help with a simple code example. Here is what I'm trying to do:

I have a directory on my desktop named WB_DEV. It has many levels of subdirectories and lots of files in each. All I'm trying to do (from within a WinBatch script) is make an exact copy of WEB_DEV on a thumb drive. The same result as if I had right-click-dragged the folder between two open file-explored windows, and chose "Copy Here".

More specifically, if

a = "C:\Users\fhammer\Desktop\WB_DEV"        ; path to WB_DEV directory
b = "D:\"                                                         ; path to tumb drive root

What statement (or statements) will get me what I want.

Thanks again for any help you can give me.


td

Have you read the help file documentation for the 'aFileCopy' function?   If so, try a few things on a couple of test directories you create and you should be able to figure it out.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

fhammer

Yes, I had read the help file and had done some experimenting. I did not find the help file to be very helpful. Maybe that's because I'm using an older (2005C-compatible) version of the DLL & help. Reading about DOS XCOPY on the web helped. I was eventually able to get it to do what I want via trial-and-error. And I do feel guitly for not doing more experimenting before posting the topic.

Thanks for responding and helping!

td

AFileCopy can certainly do exactly what you describe in your original post so I am not sure why you couldn't get it to work for you unless there is something else about what you are attempting that you did not mentioned.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade