The tag has no wiki summary.

learn more… | top users | synonyms

17
votes
4answers
30k 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 ...
5
votes
1answer
828 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 ...
5
votes
3answers
6k 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 ...
4
votes
2answers
160 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
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
11k 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
4answers
303 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
2k 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
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
54 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
2answers
4k 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?
2
votes
4answers
7k 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
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 ...
2
votes
4answers
488 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
7k 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
1answer
246 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
819 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
8k 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 ...
2
votes
1answer
350 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
93 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
239 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
141 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
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
1answer
937 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
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
70 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
3answers
869 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 ...
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
3k 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
6k 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

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
59 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
154 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
75 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
74 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
44 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
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
239 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
1answer
35 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
1k 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
338 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
535 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 ...
0
votes
2answers
1k 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) ...
0
votes
2answers
456 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 : ...
0
votes
2answers
26 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 ...
0
votes
1answer
585 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 ...