1
vote
1answer
89 views

Batch copy gives errors, xcopy works fine

I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon ...
1
vote
1answer
46 views

How to Copy File and Folder permissions but not folders and files?

I have two copies of same folder in windows. but the permissions of one of them are missing. How can I copy permissions of the original source to other? I know I can use the xcopy command but the data ...
1
vote
1answer
95 views

How can I keep XCOPY from copying more than it should?

I have a script for copying files from one folder to another. The XCOPY command looks like this: XCOPY /E /Y /V /D:%date% %reportsDataPath% TMP\ The date flag is supposed to make it copy only ...
0
votes
0answers
61 views

Copy folder structure on Windows except for one folder with files

I need to copy folder structure without files except for one sub-folder. That is I want to copy the folder structure without files plus only one of the sub-folder to be copied with its content. I can ...
1
vote
3answers
3k views

How to optionally copy and rename a file in Windows?

Basically, in an automated batch file, I want to copy and rename a file if the destination file is missing or older. There are several variants, which do not quite work: copy /Y c:\source\a.file ...
0
votes
1answer
1k views

Command to Xcopy folders across the network and rename the folder at destination as the date

I'm using Xcopy to copy a folder across a network XCOPY "C:\Documents and Settings\Administrator\Desktop\File\Output*." "C:\new" /s /e /c I want the folder at the destination to be named with ...
1
vote
2answers
80 views

Copy Windows directory, including specified directory

I want to copy the directory itself, not only the contents. For example I have C:\DirA\SubDirA\FileA I want to copy DirA into DirB so that I have C:\DirB\DirA\SubDirA\FileA Here's what I've ...
0
votes
2answers
2k views

XCOPY not copying directories

I am trying to copy one directory to another directory. It seems I can copy a file but directories won't copy. Running this at cmd: XCOPY C:\Drivers C:\Users\lenovo\Desktop Gives 0 File(s) ...
3
votes
2answers
12k views

How to copy only new files AND only those that are modified after a certain date?

I would like to copy files from one drive to another, but I only want to copy source files that are newer than the destination file. BUT, I also want to only copy source files that have been changed ...
1
vote
1answer
7k views

How to use Robocopy to copy a folder structure into all (sub)folders located under one directory?

Is there anyway for me to quickly take an empty folder structure I have created on my desktop and copy it to 488 other folders all located on a network drive but in the same folder? My primary ...
1
vote
1answer
2k views

Copying only newer files from one folder to another

I have 2 folders with files. These files are the product of some build process. The first folder is the outputs of previous build while the latter is the output of the current build. I would like to ...
2
votes
1answer
272 views

What's wrong with my XCOPY line?

I'm trying to write a batch file that will copy all new files from a source to a destination without prompting (it will be running on a server). This script will not copy files that already exist in ...
0
votes
2answers
847 views

copy works where xcopy and robocopy does not work

Network admin allowed me to read-access only 1 file from a subfolder of a shared folder on a server and I don't have permissions to even view upper level folders, but when I open that folder I can see ...
3
votes
2answers
4k views

Copying many files without stopping on errors on OSX

I need to copy several Gb from an external HD to my moan hd and some files will cause errors. If I do this with the finder, it will stop on the first error. Is there a way to copy everything no ...
4
votes
2answers
7k views

What is the benefit of copy over xcopy on the command line?

I know that xcopy has more options however is there some benefit to using copy rather than xcopy?
1
vote
1answer
1k views

How to avoid XCopy run into the error: The process cannot access the file because it is being used by another process?

I am xcopying data from my local directory to a shared windows drive. Once in a while i get an issue where in the middle of copying i see the following error: The process cannot access the file ...
1
vote
2answers
591 views

xcopy files and directory

I have a folder named "C:\Jobs\job#1" , "C:\Jobs\job#2" "C:\Jobs\job#3" etc and a lot of directories and sub-directories under it. I want to get the all the directories under Jobs and xcopy them to ...
1
vote
1answer
1k views

xcopy only copy subdirectories with their contents

As the title says... An example: I have these files & dirs: c:\file.txt c:\a\somefile.txt c:\b\anotherfile.txt And with some magic I want this structure on the destination: ...
3
votes
2answers
4k views

xcopy files into single directory

I'd like to use xcopy on a windows machine to pull out all files with .png extension into a single directory. I tried xcopy C:\folder\*.png /s C:\png\ But its keeping the subdirectories inside ...