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
4
votes
2 answers

xcopy exited with code 4, how to get this resolved?

I am running a build from Team Foundation Server(TFS), and the build is failing with the error "xcopy "C:\eComObjects_MP10\Microsoft\DynamicsCrm" "D:\Builds\19\Unicorn\MaintPackage10-…
TVicky
  • 353
  • 3
  • 13
  • 36
4
votes
4 answers

File.lastModified() painfully slow!

I'm doing a recursive copy of files and like xcopy /D I only want to copy newer files destination files (I cannot use xcopy directly since I need to alter some files in the copy process). In java I use lastModified() to check if the destination file…
dacwe
  • 43,066
  • 12
  • 116
  • 140
4
votes
1 answer

Exclude multiple file extension in xcopy

I have few extensions which I want to exclude from xcopy. I don't know in which folder/directory those may exist. Below is the command I'm using: xcopy /r /d /i /s /y C:\test1 C:\test2 /exclude:.txt+.exe Anh help on this?
user2817712
  • 117
  • 2
  • 3
  • 5
4
votes
1 answer

XCOPY with pattern matching

I am very new to Windows batch scripting so please ignore if it is stupid question, I have a requirement of copying set of files from source to destination only if source file is modified after certain date_time, I managed to do it using XCOPY…
Pramod
  • 129
  • 1
  • 2
  • 14
4
votes
2 answers

How to use xcopy to copy a file into a non existing directory?

As a part of an automated script, I am trying to do achieve something like this in windows command prompt: xcopy /I /Y resources\xyz\pqrs.txt %TEMP%\resources\xyz\pqrs.txt.bak In %TEMP%, there is no resources directory. This is the interactive…
bits
  • 8,110
  • 8
  • 46
  • 55
4
votes
1 answer

xcopy to "%AppData%\Roaming\Microsoft\Excel\XLSTART\" stated copied yet nothing is there

I'm trying to write a small bat script to put on my teams desktops and allow them to update their personal macro file with mine when ever I push out an update or have created new tools. I have the following xcopy "O:\abc Supply chain\Supply Chain…
Phairplay
  • 273
  • 2
  • 4
  • 16
4
votes
1 answer

Delete files do not exist in source folder in cmd?

I have two folders that I backup from source to destination folder using command: xcopy /E /Y /I /D Now I want to delete files in destination folder that do not exist in source folder.
behnamizadi
  • 133
  • 2
  • 8
4
votes
1 answer

Batch file: Copy all files and folder except one folder

I made a .bat file to copy some files, like backup and i need to copy all except one folder. I have, for example, folder test, and subfolders bin, log, Account... and some more files and i want to copy all files and folders except folder "log". This…
Dado
  • 1,016
  • 1
  • 12
  • 20
4
votes
3 answers

vb6 xcopy deployment

Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM . I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error. Is there any tools…
sundar venugopal
  • 3,080
  • 6
  • 39
  • 45
4
votes
1 answer

xcopy doesn't work when in a makefile

I ran into the error [copyResources] Error 4 when trying to build a project I downloaded on a 64 bit Windows 7 install. In the Makefile Qt generates, it contains the following two lines: copyResources: xcopy "D:\Downloads\GraphViz\GraphViz\res"…
Mike Precup
  • 4,148
  • 21
  • 41
4
votes
3 answers

Xcopy with Python

I'm trying to get xcopy working with python to copy files to a remote system. I am using a very simple test example: import os src = "C:\\Desktop\test2.txt" dst = "C:\Users\" print os.system("xcopy %s %s" % (src, dst)) But for…
DJMcCarthy12
  • 3,819
  • 8
  • 28
  • 34
4
votes
3 answers

Windows cmd shell xcopy to network directory doesn't work

Im trying to make a batch file that will copy all new files and folders from a source folder to an network directory. All the new subdirectories and new files should be copied (backup). My code: xcopy "C:\Source" "T:\Backup" /d/i/s/q (/d for only…
Flyckten
  • 101
  • 1
  • 1
  • 8
4
votes
5 answers

The command "XCOPY" exited with code 4 error while building checkin with new build definition

I am using TFS2012.I have created a build definition to build every checkIn uding VS2012. In Vs2008 for my project i have created a pre-build event with XCOPY to copy some files from solution Directory to another folder.But after i do CheckIn Build…
IT researcher
  • 3,274
  • 17
  • 79
  • 143
4
votes
1 answer

Lightweight SQL database with strong typing and no size limit

I'm looking for a lightweight SQL database engine that can run in the same process as the .NET application I'm developing, no other installation required. I know of two options: SQLite SQL Server Compact Edition At first glance these are pretty…
Phil
  • 6,561
  • 4
  • 44
  • 69
4
votes
4 answers

Automatically copy files without overwriting, but creating numbered ones instead

I need to copy files at a regular interval, eg once an hour so I tried setting up an xcopy batch saying it should copy the files it needs to copy to another folder. Now when it copies, it overwrites the files which is not what it is supposed to…
Robin van Dijk
  • 827
  • 7
  • 18