Questions tagged [xcopy]

xcopy is a Windows command to copy all files, directories, and subdirectories from a specified path to a target directory

Documentation:

  1. TECHNET
  2. SS64

Related commands:

  1. COPY
  2. ROBOCOPY
797 questions
9
votes
2 answers

qmake command to copy files and folders into output directory

I'm developing an app that should build on Windows, Linux and OS X using QtCreator and Qt 5.3. I want to copy all files and subfolders from a folder into output folder. I've got it working for Linux and OS X, but not for Windows. Here's the relevant…
SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87
8
votes
1 answer

Parallel copy using xcopy

I need to copy multiple directories from one location to other. So, there are going to be multiple xcopy statements, one after another. The number of files in each of the folders is huge. Is there some way by which I can run these xcopy statements…
Pramod Karandikar
  • 5,289
  • 7
  • 43
  • 68
8
votes
2 answers

Recursively copy files that match a wildcard combination but not create the directory tree in DOS

I found that I can use xcopy /s to copy all files that match a wildcard combination in a folder to another location. But this command re-creates the folder structure. I do not want the tree. I need just the files dumped into the destination folder.…
BZ1
  • 1,306
  • 2
  • 8
  • 10
8
votes
1 answer

Xcopy with excluding folders (sub-directories)

I want to copy files and folders in a directory to another folder excluding sub-folders with files contains it, as for example I have a large number of files for node_modules directory which like 100Mb with 50K+ files, that I don't need to copy. I…
Al-Mothafar
  • 7,949
  • 7
  • 68
  • 102
8
votes
3 answers

XCopy or MOVE do not work when a WCF Service runs a batch File. Why?

I have faced a case when the same batch file works differently from command line and when it is fired from a WCF service hosted on IIS. The difference is in XCOPY command. when I am running the batch file normally than XCOPY moves all data I…
Yaugen Vlasau
  • 2,148
  • 1
  • 17
  • 38
7
votes
2 answers

Return control from a batch file

I have a batch file which has several commands as follows; XCOPY DEL RMDIR anotherBatch.bat XCOPY DEL RMDIR As you can see, in between there is a call to another batch file (anotherBatch.bat), which does some other processing. Now my question…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
7
votes
4 answers

Make a relative path in batch file

I have a batch file that I wont know what drive letter it will be as I will be moving around alot. For example: The adobe files reside in: J:\Files\New folder\USB\Adob The batch file is executed from: J:\Files\New folder\USB\USBSTICK So I tried the…
Mike
  • 83
  • 1
  • 2
  • 4
7
votes
2 answers

how to copy multiple files to a folder using xcopy

would you please let me kno how can I copy multiple directories located in different locations to a backup directoy sources(directories) are D:\share\t1 , D:\new\t3 , C:\media\t4 F:\save\bank destination directory is C:\shared\backup thanks in…
user2434611
  • 125
  • 2
  • 3
  • 6
7
votes
1 answer

copy all files recursively into a single folder (without recreating folders)

With a batch (.bat), I want to copy all mp3 files that are in 1 subdirectory of D:\TEMP D:\TEMP\\(anyfolder)\\(anyfile.mp3) to E:\MYFOLDER\ I tried with xcopy but I don't know how to tell "just recurse subfolders of D:\TEMP and not subsubfolders,…
Basj
  • 41,386
  • 99
  • 383
  • 673
6
votes
3 answers

Reference a Volume/Drive by Label

I'm trying to write a batch file to xcopy a folder to a removable USB drive. The problem that I face, however, is that drive letters are subject to change, so I would like to be able to do this by referencing the volume label instead of the drive…
user1097771
6
votes
1 answer

TFS 2010 Team Build - rename a file

As part of my TFS 2010 team build, I'm trying to copy a configuration file from a network location to the output folder where the build goes to. Using xcopy as an invoke process task, I've successfully gotten it all working EXCEPT that I want to…
Isaac Abraham
  • 3,422
  • 2
  • 23
  • 26
6
votes
1 answer

Is XCOPY the fastest tool to copy folders/files over Windows file system?

I have a maintenance task to copy folders from one server to another. the source folder is big - roughly ~Ks of files / 5-6 tree levels and overall size of ~1GB. I was using Robocopy.exe and XCOPY.exe from windows command line and their performance…
NirMH
  • 4,769
  • 3
  • 44
  • 69
6
votes
2 answers

Merge all .txt files in all subdirectories in one txt file

I want to merge content of all .txt files in my directory (containing subdirectories) to one txt file. I need to do this: xcopy text1.txt + text2.txt text3.txt but in a for loop which takes all text files in current directory. i assume something…
la lluvia
  • 705
  • 3
  • 10
  • 20
5
votes
3 answers

Telling XCOPY to copy hidden folders as well as hidden files

I'm trying to get XCOPY to copy an entire directory tree and all its files, however, one of the directory paths includes a hidden folder, and although you can use the /h parm to specify copying hidden files, this doesn't seem to apply to hidden…
Cyberherbalist
  • 12,061
  • 17
  • 83
  • 121
5
votes
3 answers

How to delete files from a list?

I have a filesystem that uses a hash algorithm to organize files. I have used xcopy in the past to copy files to a different location by passing in a file that has a list of all the files and having it iterate through it. The script looks similar…
Saggio
  • 2,212
  • 6
  • 33
  • 50