The tag has no wiki summary.

learn more… | top users | synonyms

22
votes
5answers
40k views

Is there anyway to xcopy just changed or new files?

I am trying to deploy a website from my desktop to my webserver and so right now I am doing this: xcopy C:\source X:\destination /s My desktop is a Windows XP machine and I need to copy to a ...
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 ...
5
votes
1answer
904 views

XCOPY Behavior copying between remote servers

I am trying to determine the bandwidth usage of XCOPY when copying files between two remote servers. I am on an XP workstation running a batch file (over a WLAN) which uses XCOPY to copy files from ...
4
votes
2answers
8k 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?
4
votes
2answers
187 views

Backing Up from command prompt

I am trying to backup my system from the command prompt as windows will not boot. I only want to backup documents but i am trouble with the command. I am using "xcopy c:\documents and settings*.doc ...
3
votes
2answers
5k 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 ...
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 ...
3
votes
1answer
15k 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
2answers
5k 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 ...
3
votes
4answers
326 views

Where should I xcopy-deploy my applications on Windows 7?

a customer's I have some applications that are installed with plain xcopy. I know those applications will write some data into their installed directory at runtime. Now I want this application to be ...
3
votes
2answers
13k 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 ...
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 ...
3
votes
1answer
60 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 ...
2
votes
4answers
8k views

xcopy Not Surpressing File/Directory Query

Hey folks, I'm attempting to use xcopy to copy over a file from one machine to another on our network as part of a Java program. I'm calling xcopy like this: xcopy "C:\Program Files\path\to\my\file" ...
2
votes
4answers
599 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 ...
2
votes
2answers
8k views

XCOPY /Exclude Directory Syntax

I'm trying to use XCOPY to copy a directory that looks like this: -MainFolder -ManyFoldersIWantToCopy -ManyFoldersIWantToCopy -... -Source Code I want to use the /EXCLUDE option to copy every ...
2
votes
3answers
2k views

Windows XP xcopy files with extensions recursively

I have a single-line script that copies all ".ext1" files from current folder to destination folder recursively: xcopy *.ext1 D:\dest /s /d /y It works perfectly. Now I want to copy all *.ext2 as ...
2
votes
1answer
276 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 ...
2
votes
4answers
5k views

Copy files from FAT32 to NTFS, preserving date

I have a FAT32 flash drive full of old archived emails, and their creation/modification date is important because it represents when the email was received. I'm trying to copy these over to another ...
2
votes
3answers
883 views

Running a certain XCOPY command without user interaction

I am trying to run the following command in Windows CLI: XCOPY Z:\.vimrc %USERPROFILE%\_vimrc /H The /H part needs to be there because Z:\.vimrc is a hidden file. When I run the command above, I ...
2
votes
1answer
411 views

XCopy on server?

Normally, on my website, files are either handled by WordPress or by me doing FTP. I'd like to copy my entire site to a new folder. I don't want to copy it down to my local drive (with wget) and then ...
2
votes
2answers
1k 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: ...
2
votes
2answers
241 views

How do I automatically copy data when attaching external storage?

If I am correct to assume that once I place a DVD/disk in my optical drive (or use a USB flash drive or external HDD for that matter; for arguments sake) that this action would in effect trigger an ...
2
votes
1answer
154 views

XCOPY Copied files and folders as a file

Today i had some problems with a laptop, and i had to reinstall the windows on it, while i was in the recovery console, i used XCOPY batch command to copy files and folders from ...
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: ...
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?
1
vote
2answers
2k views

How to copy directory structure, by only two levels but not the third?

From XP's Command Prompt, I am using XCOPY to copy directory structure of s:\bloo\"[8family]\"[30-40genus]\"[5species]\ and want to limit the structure to just the genus and families, and ignore the ...
1
vote
1answer
100 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 ...
1
vote
2answers
673 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 ...
1
vote
2answers
2k views

How can I merge two directories in Windows and have the result contain the most recent files and directories?

I believe this question to be very simple however I want to triple check before I screw myself up. My testing has shown this process to work (I think, but I may be missing something) but again I'd ...
1
vote
2answers
4k views

xcopy and invalid drive specification

I am trying to use xcopy and it always returns with invalid drive specification xcopy "C:\socp.tar" "\\FMDX1024\C\socp.tar" FMDX1024 is a machine on the network. any clue?
1
vote
1answer
8k 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
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 ...
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
3answers
131 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\
1
vote
3answers
483 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
2answers
262 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
2answers
81 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 ...
1
vote
1answer
54 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, ...
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 ...
1
vote
1answer
251 views

Xcopy batch file behavior

I have the following backup batch file: xcopy C:\test.txt \\server\Data\user\"data test" /e /y /i Why does it not only copy the file listed but proceeds to copy the whole root directory? When I ...
1
vote
0answers
26 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
109 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
49 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
3answers
4k 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 ...
1
vote
0answers
834 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 ...
1
vote
0answers
403 views

I am getting Invalid Drive Specification when using xcopy to copy a sharepoint site to a backup location

I am getting Invalid Drive Specification when using xcopy to copy a sharepoint site to a backup location. I am executing the command via cmd window from the sharepoint server itself. I have tried it ...
1
vote
2answers
599 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 ...
0
votes
2answers
2k views

Unix equivalent of XCOPY /D

Windows has a nice option to its XCOPY command: /D. This copies only files where the source modification time is newer than the destination time. Is there any unix/linux equivalent of this? I'm trying ...
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 ...