The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
25 views

Windows Batch to copy one file to multiple directories

I have a rather simple copy and paste batch job. That checks for a more recent file and overwrites it. I was trying to take a single COPY and copy it to a second directory. In simple, this Batch is ...
1
vote
1answer
61 views

Possible to copy files and directory structure but don't copy file contents (i.e. 0 byte file size)?

I'm wondering if it's possible to copy files and directory structure, but don't actually copy file contents. I want to copy over file names and extensions but have each individual file be 0 bytes in ...
0
votes
1answer
42 views

How to copy a directory on Windows, preserving timestamps of all directories being copied

I want to copy a directory tree while preserving timestamps of any file and directory that is being copied. The source directory is on a data DVD (ISO-9660 filesystem). I am copying to an NTFS ...
0
votes
0answers
12 views

how to copy a folder and its contents to another folder using xcopy?

So I've been trying to copy a folder to another folder. But whatever I do, it only copies the file(s) inside the source folder. I've looked at numerous examples like: ss64 example microsoft example ...
0
votes
1answer
21 views

Trouble in using Xcopy to copy to a network path in batch file

Code: ::CopyTest.bat @ECHO echo 123>>%temp%\MBDocuments.txt xcopy "C:\Users\Foo\Documents\" pushd "X:\foo team\Team Members\foo\Documents" del /q %temp%\MBDocuments.txt pause So I have ...
1
vote
0answers
24 views

How to back up only newer files

I wrote years ago a script using XCOPY with parameters /E /D /Y /V /R /H that allowed me to back up newer files to my dropbox having always everything updated. Since I upgraded to Windows 7 and 10 ...
1
vote
1answer
38 views

Windows cmd copy directories and content recursively if the files do not exist

The question fits in the title: I want to copy from local storage to a network storage directories and thier contant, but only the new or updated files with no prompt. My idea would be to use xcopy ...
37
votes
5answers
85k 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
3answers
10k views

Use OneDrive as additional backup location

I'm trying to take advantage of the fact that OneDrive now offers unlimited space, and allows these files to not take up space locally. I already have a backup system in place, but I would like to add ...
0
votes
1answer
72 views

Move files of particular pattern in batch to another folder [closed]

I am trying to write a Windows batch file with commands for moving files with a pattern the file name from one folder to another folder, and others to others. For example: vision.xls should go to a ...
11
votes
4answers
42k 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 ...
0
votes
0answers
23 views

Getting exit code from xcopy when it's embedded in cmd.exe

I'm using xcopy this way: p = New Process psi = p.StartInfo AddHandler p.ErrorDataReceived, AddressOf NetErrorDataHandler psi.Arguments = "/C "xcopy *SOURCE* *TARGET*" psi.FileName = "cmd.exe" ...
1
vote
1answer
330 views

Copy from one location to another using batch script based on modified date and also newly added files in source

How to copy files which are modified and the new ones that are added in the source location to the target location using a batch script? The existing files that are already present in the target ...
1
vote
1answer
467 views

Mapped drive is not accessible, to copy files, using Task Scheduler

On my Windows Server 2008 R2 machine, a batch file is scheduled to run using Task Scheduler. For some reason, only a portion of the commands in the batch file are executed; Some MS DOS commands are ...
0
votes
1answer
42 views

XCopy Skip Identical Files Only

Is it possible to use xcopy to copy files and only overwrite existing files that differ in size? I'd like to skip overwriting identical files to speed up my copy process. I don't see anything in the ...
0
votes
0answers
67 views

Copy same root directory with files to multiple wildcard directories including files

I am trying to copy one folder and its contents to multiple user directories which vary depending on the username. The directory under each user will remain constant. Here is an example of what I am ...
0
votes
1answer
62 views

xcopy works, but doesn't

Really odd behavoir on xcopy. I have a batch file as follows "<=create a backup of a service - works fine, backup files created correctly=>" For /f "tokens=1-4 delims=/ " %%a in ('date /t') do ...
1
vote
2answers
97 views

Copying files from somewhere within a directory tree to a folder

I have a mirror of a large website that I need to reorganize, most of the images and files I've been able to programmatically move and relink up; however, there are a few (few is a relative term, ...
3
votes
1answer
479 views

XCOPY can't read /EXCLUDE file

I'm trying to write a build script batch file for an Unreal Tournament 2004 mod I want to publish the source code for. This script contains a call to XCOPY with the /EXCLUDE parameter as follows: ...
0
votes
1answer
161 views

Batch file to only copy new files from source to destination [closed]

I am trying to create a batch file that copies only new files to another folder. I have .png files that come in through FTP at various times throughout the day. So I am looking for a .bat that I can ...
-1
votes
2answers
283 views

How to create a USB that copies all photos from PC to which it is connected, using Batch files?

I tried doing this, but it is not working :: variables /min SET odrive=%odrive:~0,2% set backupcmd=xcopy /s /c /d /e /h /i /r /y echo off for /r C:\ %f in (*.jpg) do @copy "%drive%\all\pics" @echo ...
0
votes
1answer
184 views

How to simply xcopy a folder into another keeping the structure?

Suppose I have the following structure and the current working directory is root: root - sub1 file1.xml file2.xml - sub2 file3.css - _target {is an ...
-1
votes
1answer
132 views

Xcopy - Invalid number of parameters

I'm trying to create a bat file that will relocate some ECF Files from a folder to a new folder I have successfully set up a XCopy bat file for other documents (.doc, .ppt) etc and i've copied the ...
1
vote
3answers
6k 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
2k 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: ...
0
votes
0answers
26 views

Copy all specified files from folder and subfolders to another folder [duplicate]

I am looking for command or switch of command copy/xcopy/move that I could copy all specified files, eg. *pdf from all C: partition to specific folder. Is it possible?
4
votes
0answers
67 views

Unable to Copy from E partition

I am stuck in weird issue. I moved my images from my phone to a folder in Windows 8's Partition E:/. Now i am trying to move back to my Phone/Flash Drive/Other Partition/Other Machine(via Sharing ...
2
votes
4answers
15k 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 ...
2
votes
1answer
84 views

Batch File XCOPY Invalid number of parameters

I'm trying to create a backup batch file, it's been a number of years since I last did one and I'm having a bit of trouble. I am creating a folder in one location with the date and time in the folder ...
6
votes
2answers
11k 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 it is keeping the sub-directories inside ...
0
votes
1answer
150 views

Appending an extension to a new file created with xcopy

I've been having problems with xcopy in the past few days, and I'd like to stop ripping out my hair. In my DOS class, a portion of an assignment requires a file to be copied (with xcopy), and the new ...
1
vote
2answers
194 views

Wildcard file extensions xcopy

I have some files that need to be copied to a directory on a schedule. All the files have the same name but the extension increments (I have no control over this, it drives me mad) I've tried ...
1
vote
3answers
5k 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 ...
7
votes
2answers
19k 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 ...
0
votes
0answers
14 views

How to copy files and folders in clipboard to all connected removable drives? [duplicate]

I am a teacher. Usually, at the end of my classes, I want to share some files and folders in my computer (Windows 8) with my students. I have bought a USB hub that supports 4 parallel usb drives. ...
1
vote
2answers
743 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
2k 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 ...
11
votes
2answers
32k views

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

I know that xcopy has more options however are there any benefits to using copy rather than xcopy?
0
votes
1answer
69 views

Xcopy.exe: Hide all errors (window prompt)

I syncronize a folder on the hard drive with my USB device every time I insert it. For this I use a simple batch script that checks if the USB stick is inserted and if it is then do a sync by XCopy. ...
0
votes
1answer
213 views

Xcopy or Robocopy Only files that have a certain date on the destination file

I'm trying to restore files that have been encrypted by cryptowall. I have the files copied onto an external drive that I'd like to copy over the destination files on the data drive. I know exactly ...
2
votes
1answer
447 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
1k 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 ...
1
vote
1answer
5k 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
13k 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 ...
2
votes
2answers
7k 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
1answer
160 views

Copy all files from one drive to another filtering by date

have been tasked with getting all files (not folders) from one drive with a date modified value of 19/01/2015 and copying them to the same location on another drive. I have been looking in to xcopy ...
0
votes
2answers
2k 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
1answer
182 views

copy file in 8.3 format produces “There is already a file with the same name in this location” error in windows 7

I use xcopy and batch scripting to backup newer files xcopy "src" "dest" /O /X /E /H /K /I /D. I was asked if I want to replace something which should not happen. So I did the copy process manually ...
1
vote
2answers
119 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
1answer
3k 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 ...