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
0
votes
3 answers

How to overwrite files with names starting from nl_ with sp_

I have folder A and B. Folder A has files like: a.mp3 and a.txt and folder B has: b.mp3 and b.txt. What I want to do here is copy and rename the content of the folder A to B so that the files can be overwritten. Here is an example code on how to…
Tolga Demir
  • 161
  • 2
  • 11
0
votes
1 answer

To copy entire subfiles to other (only one) folder without path in windows platform

I did lots of search however i couldnt achieve what i want to do : I have a folder which contains lots of folders and files under it. I just want to copy entire JPEG files in this folder to another folder without copying previous path tree. I used…
ozturkib
  • 1,493
  • 16
  • 28
0
votes
1 answer

How to copy to a folder on a Sunday but delete on every other day?

How can I move/copy a file from D:\WindowsImageBackup\ to D:\Included\ if it's a Sunday or delete D:\Included\ if it's any other day? The scenario is: An automatic backup to a remote server runs once a day. I want a certain file to be backed up only…
Marcus
  • 9,011
  • 10
  • 45
  • 65
0
votes
1 answer

Copy file as another name if file exist

I want to copy specific file from pc to usb my code : xcopy /H /Y /C /R "C:\image1.jpeg" "G:\backup\image.jpeg" i want to do following : if G:\backup\image1.jpeg exist, copy image.jpeg as image2.jpeg (or as another name), if image2.jpeg exist,…
GM12221222
  • 21
  • 1
  • 5
0
votes
1 answer

Windows Embedded Standard 7 thin client - copying files over the network with a batch file

Is this possible to copy files from a network location with a batch file over to a thin client running Windows Embedded Standard 7. COPY command won't work, and when I try to navigate to a network location in a Windows Explorer, I get prompted to…
sarsnake
  • 26,667
  • 58
  • 180
  • 286
0
votes
0 answers

Copying files between servers SQL Job

I have a SQL job that I would like to copy files in a directory out to a directory on another server. Here is the CMD that I am running xcopy \DB1\TEST*.* \DB2\foo /S /Y And I get this error Executed as user: DOMAIN\SA$. File not found - . 0…
Isaac Levin
  • 2,809
  • 9
  • 49
  • 88
0
votes
1 answer

Batch command to not copy a file if exists and then to delete the file

I am trying to create a batch file that will Copy files from say d:\temp to c:\temp and if the file already exists on c:\temp to actually delete it from c:\temp, do not attempt to copy that file and continue copying remaining files. Repeat if exists…
user1724636
  • 3
  • 1
  • 3
0
votes
1 answer

Team City Post Build Event Causing Team City Build To Fail

I have a visual studio 2010 project which has a command to copy files. It works fine on my machine but it is causing the build on Team City to fail. I tried to create the bin folder as advised by this discussion…
markpcasey
  • 559
  • 1
  • 10
  • 18
0
votes
1 answer

Using xcopy to backup to networked hard drive?

I'm wanting to create a batch file that will back up my computer. This is what I have right now: @echo off :: variables net use U:\\...more stuff... set drive=U:\ set backupcmd=xcopy /s /c /d /e /i /r /y echo ### Backing up My…
Mlagma
  • 1,240
  • 2
  • 21
  • 49
0
votes
4 answers

A Windows batch file to c:\*.pst and copy them to a network drive without files with a duplicate name overwriting each other

My end users have Outlook pst files scattered all over their c drive. I came up with this batch file to find them and copy them to the end user's M drive. rem ************************************************** @echo off if not exist m:\migration…
John Barillo
  • 1
  • 1
  • 1
0
votes
1 answer

How to use xcopy to select specific folders(Not Files) within another folder

I am trying to xcopy specific folders from some directory to another folder, problem is i don't want to copy all the folders but i want specific folders. E.g. DirectorySource has folders (folderA,folderB,folderC) but i want to copy folderA and…
S. McGrady
  • 25
  • 1
  • 5
0
votes
1 answer

XCOPY Dos Command copy from child folder

I have a C++ Program that uses the XCOPY DOS command to copy some files. string command = "xcopy " + source + " " + dest; const char * cmd = command.c_str(); system(cmd); My problem is that this only works when the source file is in the same…
JP29
  • 633
  • 4
  • 13
  • 25
0
votes
2 answers

VS2008 Build Error with xcopy

A .NET project I've worked on, has encountered a build error recently. The project had no issues building previously, and this error persists over several development machines I've tried. I've seen similar, but not identical posts in my search,…
Corey
  • 398
  • 1
  • 4
  • 18
0
votes
1 answer

How to use XCopy in a build script instead of copy in Windows

Earlier to deploy my dot-net project into my remote server I was using copy command in a nant build configuration file. The command is shown below.
Love Gupta
  • 975
  • 2
  • 16
  • 31
0
votes
1 answer

NANT copy all files with similar name

I am converting an existing batch script into a nant script. the batch file originally made this call, which appears to copy all files with the same prefix to a directory. xcopy /y /s "paths\name*.exe" Directory\ I know how to copy a folder tree in…
zalpha314
  • 1,444
  • 4
  • 19
  • 34