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
-1
votes
6 answers

Having trouble while adding double quotes to a string that is inside a variable in C#?

I am trying to pass a filepath to xcopy command for copying a folder from one location to another( CodedUI using C#). While doing the same the problems is, I am trying to add double quotes around the path but it's not taking the correct path…
bankarpit
  • 1
  • 6
-1
votes
3 answers

Can sombody enlighten to why two of lines in batch dont work

Hi I have the following BAT file all works well except for lines 70 and 78 can anybody help Tnx- @ECHO OFF ; Reseting system color configuration... @COLOR 17 ECHO =============================== ECHO == AUTOCAD 2010 De Mar Setup == ECHO…
philip
  • 345
  • 4
  • 5
  • 9
-1
votes
1 answer

is there a way to recursively copy files in Windows 10 or Server 2012r2 which contain a particular string while maintaining the folder structure?

I have a client with a large file server (on 2012r2). The client accesses the server using machines running Windows 10 Pro. The client is not using a file management system and so the files are just organized manually into folders and subfolders.…
-1
votes
2 answers

Why does usage of XCOPY for copying *.txt files makes them empty?

I use this batch script while I program in Java to avoid cluttering my folders with class files. But for some reason it can't copy *.txt files. This is a *.txt file content before copying it to another folder: U 450 I 100 I 5000 U 500 The batch…
Waitwuut
  • 1
  • 3
-1
votes
1 answer

Batch file to copy and rename files from multiple directories

I have previously searched for an answer for my question, however nothing to this point has specifically answered it. See: Using xcopy to copy files from several directories to one directory, and Batch file to copy files from one folder to another…
M. Aberle
  • 25
  • 1
  • 8
-1
votes
1 answer

How to copy only one file (first find) using XCOPY *.bin dest

I need to copy only one file from a folder containing only binary files. I don't know the exact name of the file so i am using *.bin as the parameter. But using *.bin will copy all the .bin files to the destination.
-1
votes
1 answer

c# - Process.StartInfo.Arguments - path with dir with space

I need to write a small console program for copying some content to AppData/Local. As a source, I have a folder with a space in it. Lets call it "My Folder". My folder contains subfolders and other content. So I have ./MyFolder and I need to copy it…
Zorak
  • 709
  • 7
  • 24
-1
votes
1 answer

xcopy command via C++ 'system' not working

I'm trying to copy files from one folder to another via xcopy in my C++ application. The command outputs : "Invalid number of parameters" here is the code: system("xcopy H:\Temp\Configurations C:\temp\TSE /E"); If i try the same command directly in…
Rana
  • 1,675
  • 3
  • 25
  • 51
-1
votes
1 answer

xcopy create a new folder and rename

We want to copy a folder from multiple PCs in a master PC for backup We have the following code: cd C:\Users\magazin\Desktop\Scripts\Test_Lorin\swcom_script del results.txt for /F %i in (PC.txt) do ( copy /R /Y /S "\\%i\d$\SWCOM"…
-1
votes
1 answer

Xcopy, how to not copy empty folders

Here is the code. xcopy /c/s/z "%appdata%" "./backup" Is there a way to make it not copy folders with nothing in them?
Jeanuz Debuzz
  • 21
  • 1
  • 4
-1
votes
3 answers

java why not just executing 'xcopy /S $sourceDir/* $targetDir' or similar instead of 'reinventing the wheel'?

im still relatively new to java but i have experienve in scripting like DOS, Windows and Bash. today i would like to EASILY copy recursively the content of an directory (files and directories) from a sourceDir to a destinationDir from my Java CLI…
Axel Werner
  • 186
  • 1
  • 17
-1
votes
2 answers

Batch file to copy all contents of folder to another folder based on date

I have multiple auto-generated folders in the location C:\ABC . Each auto-generated folder is created at the start of the day and naming convention is "HS". Eg: - C:\ABC\HS08042015 - C:\ABC\HS08032015 - C:\ABC\HS08022015 - C:\ABC\HS08012015 So…
Naved Zia
  • 13
  • 1
  • 4
-1
votes
2 answers

post-built event xcopy fails with exit code 4

my Xcopy fails to execute properly after I compile my project. xcopy "$(SolutionDir)LuaModules\*.*" "$(TargetDir)Modules\" /S /H /Y /C
blipman17
  • 523
  • 3
  • 23
-1
votes
1 answer

How to exclude some files from being copied using xcopy?

I am trying to copy a folder from one place to a network place. But I want to exclude some folder from being copied. :: time and date stamp YYYYMMDD, HHMMSS and YYYY-MM-DD_HH-MM-SS @echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^|…
Jaylen
  • 39,043
  • 40
  • 128
  • 221
-1
votes
1 answer

How to supply a string for the system() function in C++

I'm just getting back into C++ after a few yeas of not using it, and am trying to do an "xcopy" command through the system() function. I assumed it would work just giving it a string so I did something like: string command = "xcopy " + source + " "…