1
vote
0answers
20 views

I copied a folder with copy&paste instead of 'xcopy'. How to fix that?

I copied a folder (Windows Server 2003) with copy-paste instead of 'xcopy' or 'robocopy'. Now I lost the original permissions, and I can't re-do the copy process (can't access the original folder). ...
1
vote
1answer
58 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 ...
0
votes
1answer
59 views

xcopy command does not work in a batch file

The command below works in CMD Prompt, but does not work in a batch file. xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e
0
votes
1answer
75 views

“Copy but keep both files” but only for files with different timestamps

I'm trying to consolidate 5 very similar but slightly different tree structures into a single one but not lose any modified data. So, I need a solution that will: 1. Copy files that exist in the ...
0
votes
2answers
64 views

Copying files that match one pattern but not another

I have a number of files that follow a pattern like this: <BaseName> . <Version> [ - <Tag> - <#> ] . <Extension> For example: basename.1.0.0.ext ...
2
votes
2answers
641 views

Administrator getting “access denied” - unable to create directory

As far as I can tell, I am in the Administrators group on Windows 7 Service Pack 1. With CMD prompt pinned to my Start menu, I rightmouse and select Run as Admin and get this error on xcopy: ...
1
vote
3answers
92 views

Batch file, copy files beginning with (A,B,C,D,E)

Instead of running xcopy 6 times, is there a way to define an array of files to copy? xcopy \\\from_location\\(A,B,C,D,E)*.txt \\\to_location\
0
votes
0answers
61 views

How do I xcopy only specific subdirectories and files within subdirectories

Here is an example of what I have: c:\top\dir1\dir2\dir3\desired_dir1\desired_file.abc c:\top\dir1\dir2\dir3\desired_dir1\unwanted.file c:\top\dir1\dir2\dir3\unwanted_dir2\some.file ...
0
votes
2answers
197 views

What's the correct syntax for using an IP address in xcopy?

I want to copy a set of files on a Windows computer to a number of Windows servers I have credentials for without having to go through RDC, theoretically a simple task. For this usage, the appropriate ...
1
vote
3answers
309 views

Looking for a way to copy a file that does not lock the file being copied

I am aggregating together data that is being generated at a bunch of disparate sources, in a mixed environment of various versions of windows (xp/7) and one linux (centos). The data is available via ...
1
vote
1answer
45 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
2answers
160 views

Copying a directory by retaining its permission

I've located this KB article which explains the topic title. But what my problem is that when I use "xcopy" command; it only copies the contents inside a directory to the new location but not the ...
1
vote
1answer
89 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
51 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
2answers
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 ...
3
votes
1answer
56 views

Spaces in FOR /R output

I need to copy a file C:\plst.m3u into all subfolders of C:\Music. I'm using this command: FOR /R "C:\Music" %G IN (.) DO xcopy "C:\plst.m3u" %G It works, but only for the paths, which doesn't ...
0
votes
2answers
115 views

How to copy folders on same NTFS drive using hardlinks?

Is there a way to create hardlinks to create a duplicate of a folder on the SAME drive (NTFS formatted)? I am looking to do something like this: XCOPY E:\TEMP\SAMPLE1* E:\TEMP\SAMPLE2\ /s but INSTEAD ...
1
vote
1answer
49 views

Is the order of options for xcopy command important?

Is there a difference between these two lines?: xcopy C:\source X:\destination /s /d xcopy C:\source X:\destination /d /s I've noticed that with the first one I also copy newer files in subfolder, ...
0
votes
2answers
2k views

Merge directories without overwriting conflicts

I have 2 directories structures (A and B) that normally don't overlap. I want to merge A into B. The following command will merge the directories: xcopy A B /E /Y However, I want to be able to ...
0
votes
2answers
212 views

Getting access denied on the destination drive partition. after using xcopy

i am wanted to copy the all the files in folder including sub-folders from one hard drive to another hard drive for this i tried below xcopy command C:\Documents and Settings\rakesh>xcopy "D:\Ganesh ...
0
votes
0answers
342 views

“There is no disk in the drive.” error message from an application that was just copied from a CD with batch file xcopy but doesn't require it at all

All, I have an interesting problem that I have looked everywhere for an answer and have come up short. Hopefully someone out there can shed some light as to why this is happening. I have a CD that ...
1
vote
2answers
558 views

Files copied using xcopy command are hidden in destination

I copied almost 100GB of files from my laptop to my external drive using the following xcopy command. X:\windows\system32>XCOPY E:\ "L:\BackupFolder\" /S /E All the files in E: were copied to ...
3
votes
2answers
11k 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
0answers
768 views

How can I specify an /EXCLUDE file with spaces in it to xcopy?

I have tried to specify an /EXCLUDE filename with spaces in it to xcopy, but it always chokes. How can I specify such a path to xcopy without copying the /EXCLUDE files into the current directory and ...
0
votes
2answers
2k views

Can xcopy make a bootable copy (clone) of Windows?

Following on from my discussion with @JustinD in the comments here, is it technically possible to simply xcopy the contents of a Windows partition to a partition freshly created and formatted on a new ...
1
vote
1answer
1k 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 ...
1
vote
1answer
3k views

How to use xcopy with relative paths? [closed]

I've tried to use xcopy using relative paths and have had no luck. I opened a command prompt as administrator. CD'd to my base directory where I want to xcopy a valid file from one location to ...
2
votes
4answers
564 views

Backup Important Windows files to USB drive

A person I know who is not very good with computers wants to have an easy way of backing up important files on Windows, with the ideal process being: Plug in USB drive Click on Desktop shortcut Have ...
0
votes
0answers
382 views

Why is the /d flag not working with xcopy?

Am I going crazy? I'm trying to copy logfiles that were generated today: xcopy i:\logs c:\logs /d:05-02-2012 It's copying zero files even though there should be some files modified today. What am I ...
0
votes
1answer
219 views

Why is my batch file doing nothing for 46 seconds before a forced quitting?

I have figured out what part of the code is doing this but dont know how to fix it... Here's the code: Set _Path=Private For /F "Delims=" %%I In ('Attrib "%_Path%"') Do Set _Attribs=%%I If ...
4
votes
2answers
6k 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?
0
votes
1answer
346 views

xcopy command and winrar files

I am new to cmd commands and am having a problem with the xcopy command The command: xcopy /e E:\ C:\testFolder\ Doesn't work. It would copy files but would stop when copying winrar files(.gz) ...
0
votes
3answers
127 views

Copy a file from multiple folders

I'd like to use xcopy on a Windows machine to pull out all files with .doc extension into a single directory. An example: I need to copy the .doc file from the below source: D:\new ...
3
votes
2answers
3k views

Behavior of xcopy when moving files on a network drive

Using a batch file, suppose a directory on a network machine, mapped to a drive with net use. net use \\"server name"\"share name" y: Then from that directory y: cd archive An xcopy to another ...
0
votes
2answers
487 views

Why does xcopy's /f option affect spaces in exclude files?

I used asked this question and got an answer that seemed like it could not possibly be right, but I tried it and it worked! How could the /f option, which according to the documentation : ...
1
vote
3answers
1k views

can't exclude path with a space (xcopy)

I'm trying to use xcopy /exclude:exclude.txt and one of the paths in exclude.txt has a space in it and it's not working. Is there any workaround for this?
0
votes
1answer
576 views

how check all of my file copy correctly by batch file?

I have a batch file that copy all the files from src place to dest place. I used xcopy command. Now I want to make sure all of my file copy correctly and delete all the files in src folder, do you ...
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: ...
6
votes
3answers
7k views

Windows: File copy/move with filename regular expressions?

i basically want to run: C:\>xcopy [0-9]{13}\.(gif|jpg|png) s:\TargetFolder /s i know xcopy doesn't support regular-expression filename searches. i can't find out how to find out if PowerShell ...
3
votes
1answer
13k views

Why is xcopy returning “invalid number of parameters”?

Under some circumstances, xcopy will return the error Invalid number of parameters without giving you a clue as to what’s going on. The usual solution for this is to be sure that your filenames are ...
3
votes
7answers
3k views

Incremental/Differential Backup on Windows

What's the easiet way to perform an incremental/differential backup to a network share in Windows? Does a Robocopy/Xcopy solution work reasonably well (I need to the parameters!) or is there a good ...
0
votes
2answers
2k views

XCopy file creation error

I use xcopy to run a weekly backup of my files to a backup HDD. On the recent backup, it failed on a file with the following error message: File creation error - The directory or file cannot be ...
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 ...