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

Batch Script Copying Files

I'm having trouble trying to create a batch script to copy a file from source A to source B, but need to copy the newest file by date with a file size that is larger than 1KB. It also need to copy a file from source A and overwrites a file that…
JayC1980
  • 1
  • 1
  • 1
0
votes
2 answers

Need Xcopy command to copy and rename all the files

I need a 'Xcopy' or any copy command to copy a file from source to destination and rename the file. for example Source directory : C:\Source\ Files in Sourced irectory : textfile.txt ; xmlfile.xml; htmlfile.htm Destination directory :…
BABA
  • 267
  • 4
  • 7
  • 15
0
votes
2 answers

Visual Studio 2010: CopyDirectory or xcopy to copy Whole Directory

I would like to copy whole directory to another directory. xcopy and My.Computer.FileSystem.CopyDirectory only copies the "Content" of the directory. For example: If source: C:\Users\Myfile555\ and Destination: C:\Dest\ I would want the files to be…
FerX32
  • 1,407
  • 3
  • 18
  • 28
-1
votes
1 answer

xcopy regex for excluding names

I have a folder named Account I want to xcopy all its subfolders, but it two phases (i.e. two xcopy commands): I want to splint this cmd: xcopy /I /E /Y %env.working_directory%\Deployment\Account\Release*.* …
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
-1
votes
2 answers

XCOPY- How to copy Source Folder and all subfolder/files but INCLUDE THE SOURCE FOLDER

All Xcopy/robocopy documentation seems to gloss over copying the folder as if you are performing a right-click copy and paste. I want C:\Folder to copy to D:\Whatever but I want it to look like D:\Whatever\Folder I dont understand why all commands…
Clint Siebert
  • 11
  • 1
  • 1
-1
votes
2 answers

XCOPY - How to exclude a certain file name?

This is my current xcopy command: xcopy C:\SourceCodeOld\Release\"Source Code"\*.vb C:\SourceCodeNew\"Source Code"\ /S /Y /R In several subfolders, I have a file named "AssemblyInfo.vb". How can I exclude it from being copied?
Alexander
  • 69
  • 7
-1
votes
1 answer

Is there a reason why this batch line to copy files from one drive to another only completes halfway?

Using the below line to copy all files from C drive folder 'Data' to D drive folder 'odrive DATA' and will create a new folder to store copied files. echo ### Copying files from company data to odrive backup... xcopy C:\Data D:\"odrive…
weslang
  • 1
  • 1
-1
votes
1 answer

xcopy, net use not working from Linux machine

I am trying to copy files from windows server to network shared folder via VPN . Here is my code from batch file. This is working fine without any issues. net use \\servername\test_folder password /user:user_name xcopy C:\Apache\htdocs\arul\xias…
user3408779
  • 981
  • 2
  • 19
  • 43
-1
votes
1 answer

Using xcopy instead of robocopy for wildcarded files

I'm working on an old 2003 server and I want to copy a folder for specific files while also retaining the folder structure. Note: I am not allowed to install or add robocopy onto this server. The command that I use on another server is usually…
-1
votes
1 answer

XCOPY: Is it possible that the source folder contains the destination folder?

I want to copy a folder with xcopy. However, as soon as I place the destination folder in the source folder, nothing is being copied anymore. Is there a workaround for this problem? The idea is to generate a backup of an entire folder strucutre…
MarkusNY
  • 13
  • 5
-1
votes
1 answer

How to print only number of files copied as a variable, while logging all the actions?

I'm writing a script on a BAT file to use when necessary, to backup a folder of an application on several computers. This script works on Windows 7: will it also work on Windows 10? :: Backup script with logging @echo off net use…
XIM
  • 35
  • 1
  • 1
  • 6
-1
votes
1 answer

xcopy batch issue

I want to copy a set of subfolders where name contains items on a list. The list has a set of codes (e.g. ABC1, ABC2) but the folders are named ABC1_revised_2018, etc. My batch file I put together is below. What I am getting a '"Usebackq tokens=^"…
sibelius3
  • 1
  • 1
-1
votes
1 answer

Xcopy and replacing a file

When I'm using Xcopy command in CMD to copy and replace a file from the user's download location to another location, I'm getting invalid number of parameters. Here's my code: xcopy /y C:\%userprofile%\downloads\XXXXt\XXXX C:\Program Files…
Ryan Ellis
  • 11
  • 4
-1
votes
1 answer

Script to clone a template folder retaing permissions and prompt for new folder name

May I please get your insight? I have a user group in AD call Contract Admin. I like would this user group to be able to run a script that clones a template folder (retaining permissions) to a new folder and prompt for a new client name. The folder…
-1
votes
1 answer

problems with various CMD commands

I'm Ninjight, i'm the same guy that wrote this: creating an self-extracting .exe file with iexpress through command line prompt? this time, i have a problem with an attempted batch extension, so, i made this just for a test, but… it doesn't seem to…
Envy
  • 3
  • 5