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
18
votes
7 answers

Execute windows batch command from Jenkins fails but runs fine in cmd.exe

I am trying to run this command in jenkins after a MSbuild xcopy "C:\Program Files (x86)\Jenkins\workspace\trunk\Projects\results\results\obj\Debug\Package\PackageTmp" "Y:\Extraction_Zone\Jenkins\" /E Y: is a mapped network drive. This runs fine…
Chris
  • 1,163
  • 3
  • 13
  • 22
16
votes
4 answers

Windows batch copy files from subfolders to one folder

I had tried to make batch script that copies all *.tif files located in D:\images(random named subfolders here) to d:\all. xcopy D:\Downloads\*.TIF D:\temp\ /s works, but it copies with all folder tree. I tried to use other keys, but its dont…
Sergii Rechmp
  • 309
  • 1
  • 6
  • 16
15
votes
5 answers

Hide Command Window in C# Application

Before you say its a duplicate question, please let me explain (as I've read all similar threads). My application has both of these settings: procStartInfo.CreateNoWindow = true; procStartInfo.WindowStyle = ProcessWindowStyle.Hidden; and is…
mint
  • 3,341
  • 11
  • 38
  • 55
15
votes
3 answers

xcopy returns error "Invalid number of parameters" when exclude parameter is set

Issuing: xcopy X:\ "Y:\...\bin\9876543210\" /c /g /d /i /e /r /h /y works as expected. However: xcopy X:\ "Y:\...\bin\9876543210\" /c /g /d /i /e /r /h /y /exclude:"Y:\...\exclude.txt" returns error: Invalid number of parameters Which also…
user4157124
  • 2,809
  • 13
  • 27
  • 42
15
votes
1 answer

PowerShell use xcopy, robocopy or copy-item

The reason for switching from batch files to powershell scripts is to improve error checking of the process. Does the cmdlet for copying have advantages in this regard? If a batch file already exists that uses xcopy to copy files by filename…
Adam
  • 1,825
  • 1
  • 17
  • 24
13
votes
6 answers

xcopy does not create directory structure

I have a strange problem with xcopy in Windows XP Professional. I don't know if its a stupid question as I am specifying only a file as the source, so should I even expect any other behavior ? This is it: I am using xcopy /s/y.…
Pulak Agrawal
  • 2,481
  • 4
  • 25
  • 49
13
votes
3 answers

SolutionDir set to *Undefined* in post-build xcopy event

I have a project that has a post-build event that xcopies a DLLs to a certain directory: xcopy "$(TargetDir)$(TargetName).dll" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y xcopy "$(TargetDir)$(TargetName).pdb"…
Justin
  • 17,670
  • 38
  • 132
  • 201
11
votes
4 answers

saving multiple files through xcopy

i want to copy multiple files at once through xcopy. is it possible. i mean something like: xcopy file1+file2+file3 destinationfolder any help is appreciated :)
sushant
  • 923
  • 5
  • 17
  • 33
11
votes
2 answers

Renaming Hidden and System files Command

I'm trying to figure out a way to rename Desktop.ini to *.ini and back again. The problem is I need to do this with the attributes in tact (So I cannot remove hidden and system and then rename). The only solution I have come up with is xcopy and del…
Built on Sin
  • 351
  • 2
  • 6
  • 19
11
votes
4 answers

Running batch file with arguments from C#

I have a batch file like this @echo off xcopy /e %1 %2 I have my C# code as follows: string MyBatchFile = @"C:\Program Files (x86)\MybatchFile.bat"; string _sourcePath = @"C:\FolderToCopy"; string _tempTargetPath = @"C:\TargetFolder\"; var process…
Sandy
  • 11,332
  • 27
  • 76
  • 122
10
votes
3 answers

xcopy all folders and subfolders from txt(with paths , and spaces )

I have a txt file with the full path for .jpg files, I need to xcopy the whole folders including everything inside using xcopy using batch file
massaki
  • 759
  • 2
  • 8
  • 15
10
votes
2 answers

xcopy wildcard source folder name to destination

I want to copy from a wildcard source folder to a destination folder: xcopy a:\parentfolder\n* x:\parentfolder Only folders starting with "n" should therefore be copied to the destination. Any help to get this working would be much appreciated.
Wonderer
  • 113
  • 1
  • 1
  • 6
10
votes
1 answer

What is an "XCopy version"?

I am trying to download Oracle Data Access Components. Some of the components are named as XCopy version. I know that XCopy is a command but what exactly does it mean in this context ?
Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
9
votes
4 answers

batch to copy files with xcopy

I have checked some examples on internet but I can't get my (first) batch file to work. I would like to copy automatically my file from a folder to another one but nothing happen. @echo off xcopy "C:\source\" "C:\target\" /c /d /i /y exit Could you…
remyremy
  • 3,548
  • 3
  • 39
  • 56
9
votes
5 answers

How to use xcopy to add the date in the destination file?

This is my current code xcopy "C:\Users\Asus\Desktop\Test\Test.MDB" "C:\Users\Asus\Google Drive\" /Y /H /E /F /I exit I need the code to do something like: xcopy "C:\Users\Asus\Desktop\Test\Test.MDB" "C:\Users\Asus\Google Drive\Test (4-21-18).MDB"…
Pherdindy
  • 1,168
  • 7
  • 23
  • 52
1 2
3
53 54