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

Batch: Copy files from txt file into one folder

I am attempting to create a batch file to copy several files listed in a text file to a new folder. I have found several threads relating to this, but I can still not get the batch to work properly. The problem I am encountering is that the files…
user1189644
  • 21
  • 1
  • 1
  • 3
2
votes
2 answers

converting xcopy to robocopy

Tried to use xcopy and excluding a folder and all its subfolders. C:\Merged\org\a>xcopy /I /E /Y C:\Merged\org\*.* C:\Merged\dest /exclude:"C:\Mer ged\org\a\*.*" Can't read file: "C:\Merged\org\a\*.*" I guess I cannot exclude folder, but only file…
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
2
votes
2 answers

XCopy WPF deployment

If I wanted to just xcopy my WPF app, what are the minimum necessary files from the Release folder to copy? In my Release folder, I have various dlls that my project references, a vshost.exe, a vshost.exe.manifest, .pdb files, etc. Is it necessary…
CheckRaise
  • 550
  • 2
  • 16
2
votes
5 answers

Programatically batch files to copy at night

I need to create an Intranet website (page) which allows users to indicate a local network folder to copy to a production location. Currently this is done manually using xcopy in batch files. What I am looking for is approaches on triggering the…
Brettski
  • 19,351
  • 15
  • 74
  • 97
2
votes
1 answer

Xcopy equivlent for VB.net

Simple question how do i copy and move the entier contents of a directory to another ussing VB.net then also delete the files from there original directory?
LabRat
  • 1,996
  • 11
  • 56
  • 91
2
votes
1 answer

XCOPY /d - does it support time as well as date?

XCOPY /d is documented to take a date in the form dd-mm-yyyy but I can't find any mention of similar support for time. Is there (or a workaround even) or do I have to download another command line tool for winxp?
citronic
  • 9,868
  • 14
  • 51
  • 74
2
votes
3 answers

Windows xcopy using java Runtime.exec not working for filenames with chinese characters

I currently have a java program that uses xcopy with Runtime.exec to copy files. But the problem now is that when the file name has chinese characters this does not work. It gives a file not found error. However if i copy the file path from explorer…
rcs
  • 133
  • 2
  • 7
2
votes
1 answer

Why does xcopy require multiple quotes?

When the FOR loop in my backup script uses a double-quoted input parameter ("Default User"), I get an "invalid number of parameters" error at the xcopy command line unless I enclose it with an extra pair of double-quotes. The other commands work OK…
user892267
  • 21
  • 2
2
votes
1 answer

Creating a folder on a remote server using batch file from teamcity build agent

I am trying to create a folder on a remote machine by running the batch file from teamcity and then copy source into that folder but it seems to be not doing. Using following code to create and copy SET…
sam
  • 4,594
  • 12
  • 61
  • 111
2
votes
1 answer

why does the list switch allow xcopy to work?

I have a batch script that uses xcopy to copy a large number of files. For a while, the following setup worked fine: set source= set dest= xcopy /y /s /i /r "%source%" "%dest%" Today, the same command…
mathlete
  • 51
  • 6
2
votes
1 answer

Powershell equivalent to copy the Xcopy only updated files that exist in target

In windows batch I would do xcopy source_spec target_spec /d/u/r/y /d : more recent /u : only those that exist in target /r : ignore the read only flag /y : don't prompt for overwrite What's the simplest using the powershell copy-item/copy cmdlet…
Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
2
votes
0 answers

Copy File to Another Server Using Batch File

How to copy files from one server to another server using a batch ? This are my command. @echo off xcopy /e D:\Data Source\Image "\\192.168.0.1\C$ ABCDI123 /user:ABCD\Administrator \D:\Data Source\\Image exit Source Folder: /e D:\Data…
JohnCincau
  • 39
  • 2
2
votes
1 answer

Batch script to copy/delete folders matching a certain name and preserving their directory tree

I am wondering whether it is possible to write a batch script for CMD.EXE (Target system: MS Windows 2k3) for doing the following: Let us have folder rootfolder containing a lot of files and directories. Some of the subdirectories (at different…
JoeSlav
  • 4,479
  • 4
  • 31
  • 50
2
votes
2 answers

How can I use regex to chop apart xcopy statements embedded in .csproj files?

I'm working with a bunch (~2000) .csproj files, and in this development staff there's a historical precedent for embedded xcopy in the post-build events to move things around during the build process. In order to get build knowledge into once place,…
bwerks
  • 8,651
  • 14
  • 68
  • 100
2
votes
1 answer

the command exited with code 4 with EntityFramework.SqlServerCompact nuget packge

I am having an issue when I try to use 'EntityFramework.SqlServerCompact nuget packge'. I have created my model classes and I am also using the new ASP.NET MVC Tools Update MVcScaffolding out for the box feature when creating a new controller. this…
tugberk
  • 57,477
  • 67
  • 243
  • 335