Questions tagged [xcopy]

xcopy is a Windows command to copy all files, directories, and subdirectories from a specified path to a target directory

xcopy
Filter by
Sorted by
Tagged with
1 vote
1 answer
803 views

Copy fixed number of files using xcopy

I have a large directory with lots of sub-directories and files in them. For testing purpose, I need to create a copy of the above with exact directory structure (empty dirs too) but copy only two ...
Regmi's user avatar
  • 2,678
1 vote
1 answer
965 views

Comments or remarks in an xcopy exclude file

I know how xcopy works, but is it possible to add comments to your exclude files? Something like this: .pdb .xml .config Some.dll /* excluded because ... */
Peter's user avatar
  • 13.9k
1 vote
1 answer
1k views

Why does TFS Build not recognize xcopy as a command?

I am using TFS 2008 and within my TFSBuild.proj file I have a target that calls xcopy to copy the build to the production location. However, I am receiving the following error when running the build: ...
mattgcon's user avatar
  • 4,808
1 vote
2 answers
962 views

Dynamically loading assemblies and their dependents using XCOPY deployment

I have an application loader that dynamically loads applications. An application is an assembly with all of its dependents in a single folder. Using XCOPY deployment I can add/remove applications by ...
user avatar
1 vote
3 answers
7k views

Xcopy should copy all files older then a specific date

I am working first time with xcopy and I have to copy all files that are older then a specific date. The parameter /d copys all newer files then the specific date. Is there any way to copy older ...
ivyomni's user avatar
1 vote
2 answers
85 views

recursive batch-file for movin *.doc, *.pdf, etc

I recovered the files from a HDD with windows 7 installed now I have a mess in a folder, with thousands and thousands of files and folders, I really don't know much about batch coding but by watching ...
manuelOS's user avatar
0 votes
2 answers
1k views

Xcopy directory pattern matching

I need to copy source file to destination folder using bat file. I have created this: @echo off set source="D:\Folder1\file.dll" set destination="D:\Test\TestCopy*\Test\" xcopy /s /y %source% %...
PSR's user avatar
  • 893
0 votes
3 answers
501 views

Copy files and output the target path of the overriden files

I would like to write a batch that will copy all of the files in a given source path to a given output path, and plot the target path of the files that were actually changed. XCOPY is doing almost ...
Mugen's user avatar
  • 8,803
0 votes
1 answer
7k views

Copy Files recursively from inside directory to outside using batch file

There is this directory structure: Dir1 --Dir2 --File1 --File2 --Dir3 --File3 --File4 --File5 Now I want to copy all the files in subdirectory (Dir2, Dir3) to parent Directory Dir1 using ...
Priyam's user avatar
  • 23
0 votes
2 answers
3k views

How to copy a file to a specified path while installing exe?

I have to copy a file(at the time of installation) residing in same folder where exe and msi installer exist to some different path. To do this i wrote a following code in installer class. System....
Amit Pal's user avatar
  • 10.8k
0 votes
1 answer
1k views

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. <target name="Deploy"> <copy todir="${...
Love Gupta's user avatar
0 votes
2 answers
173 views

Need to merge 2 folders that have hundreds of thousands of files in each. VB.net

I need to merge these folders that have a TON of files in each directory. I would use folder.copy but that takes forever. I have been using xcopy process to handle this for the most part but I have ...
Zach_peterson4's user avatar
0 votes
1 answer
380 views

Move-Item cmdlet to move a folder using C#

I want to move a folder containing 50GB of files to a Shared folder using C#. Iterating through directories and copying each files using FileInfo CopyTo method doesn't seems to be best option for me. ...
Yesudass Moses's user avatar
0 votes
1 answer
5k views

Copy remote server directories to local machine

We have an architecture where there hundreds of java components deployed on multiple servers(40 odd). Business process involves data being passed from one component to another. Each component spits ...
Marco's user avatar
  • 97
0 votes
2 answers
2k views

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 ...
Corey's user avatar
  • 398
0 votes
1 answer
2k views

In DOS how to copy one level of directory structory but not subdirectory structure?

In DOS I run this command to copy just the directory structure (including subdirectories): xcopy c:\sourcedir d:\destdir /T /E This will copy all subdirectories under sourcedir. Example these ...
JeffJak's user avatar
  • 2,028
0 votes
5 answers
938 views

Making batch file for copying

Can anyone advise me please im using Windows XP Pro on C drive and need to be able to copy a file from one drive to another. This case original will have to be renamed and old file must be put on ...
user avatar
0 votes
2 answers
4k views

PowerShell Foreach Loop with Variable for User Accounts to Copy File

I'm trying to copy a file to a list of users' folders on a network share using a foreach loop and a variable containing all of the user names. This is what I've done so far with no success. I ...
user12941688's user avatar
0 votes
2 answers
493 views

Bat file to copy to device based on device name not drive letter

Not sure the best way to accomplish this and looking for a point in the right direction. Currently use a Bat file to fetch Backup files and copy them to an external device. For example: XCOPY C:\...
Dave Hamilton's user avatar
0 votes
1 answer
14k views

XCOPY overwrite action?

in the bat file I got a simply command like : xcopy "C:\Users\me\Documents\ApplyPatchBat" "C:\Users\me\Desktop\Test\" /S/E/K This does the job where it will copy all the files including files ...
Luis Liu's user avatar
0 votes
1 answer
11k views

Batch file to backup data to networked drive?

I am trying to create a backup of some local files on one machine, to a networked hard drive on another machine. The source computer is running Windows Server 2008 R2, and the destination machine is ...
user3081481's user avatar
0 votes
3 answers
866 views

Batch file process killed in Java: xcopy does not close

This seems like it should be fairly easy to solve, but I am not familiar enough with the use of batch files to solve it for myself. I have a Java method that creates a process builder and runs a batch ...
DerStrom8's user avatar
  • 1,321
0 votes
1 answer
17k views

Batch to copy and replace a txt file from one server to another

I have two servers, server1 and server2 on same network but require username and password to be mapped. server1 has a text file as C:\Users\output.txt. I want to create and schedule a batch script on ...
Sunny's user avatar
  • 8,042
0 votes
1 answer
4k views

batch file copying not working, tells me cannot find file specified [closed]

So basically I have this batch file and it's going to be the installer when people download the program. But even though the files and everything are already there, it keeps telling me "cannot find ...
Randy Tan's user avatar
0 votes
1 answer
1k views

Proper variable scope in windows batch script

I cant figure out this variable scope.. heres the code. I've been reading around but cant seem to nail it. I want to copy a file 4 times and concatenate a name every time expanding the name of the ...
HLB's user avatar
  • 562
0 votes
1 answer
4k views

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 ...
markpcasey's user avatar
0 votes
1 answer
146 views

Is there a way to do an "xcopy deployment" of a JSP?

One of the things that's neat about the IIS / ASP.NET environment is the ability to do an "xcopy deployment" - you can literally just drop a stack of .aspx pages in a web-shared directory, and ISS ...
Electrons_Ahoy's user avatar
0 votes
2 answers
257 views

XCopy - Only grab files that are fully uploaded

I have an automated job that pulls files that are uploaded to our servers via a client facing site using xcopy. Is there any way to only pull files that are fully uploaded? I have thought about ...
Miyagi Coder's user avatar
  • 5,482
0 votes
4 answers
654 views

File Replication Solutions

Thinking about a Windows-hosted build process that will periodically drop files to disk to be replicated to several other Windows Servers in the same datacenter. The other machines would run IIS, and ...
0 votes
1 answer
1k views

use xcopy in package.json

I have a react application and a express server. I am serving react app through express server as a static page. I want to copy the build folder from the react application to server each time I build ...
Brutus's user avatar
  • 163
0 votes
2 answers
142 views

Batch Script to switch files depending on userinput

How it should work/What it should do: At C:\Users\RandomUser/Game I want to replace the file at C:\Users\RandomUser/Game/ConsoleVariables.ini. In order to do so the user should prepare a folder with ...
Julian 's user avatar
0 votes
2 answers
463 views

Windows Batch: Call after CMD finishes

I have Windows 10 and inside of my batch file I do the following: start cmd /k "Build_x1.bat" start cmd /k "Build_x2.bat" start cmd /k "Build_x3.bat" ... start cmd /k "Build_xN.bat" The reason that ...
JTR's user avatar
  • 25
0 votes
2 answers
137 views

How can i check if a directory exists with wildcars inside an if exist and copy this folder to another location?

I am trying to write a bat script in order to better organize my clients' files. I have created two folders. The first one is named "folders" and contains the folders for each client with their files....
Kjssplass's user avatar
0 votes
2 answers
1k views

Build script to copy files from various source folder to various destination folder

The basic requirement is to copy the various files and folders from different solution/project directories to the single build_output folder(/subfolders). Currently, I am doing this operation using ...
OmGanesh's user avatar
  • 1,032
0 votes
1 answer
107 views

File Copy if exists with a slight twist

I have a source folder FolderSource with 200K files that were created in the last 6 months. New files (about 10k to 11k) are added every day to this folder. I need to copy them to FolderDestination ...
Raj More's user avatar
  • 47.6k
0 votes
2 answers
1k views

Move video files from Pictures directory to Video directory

My photo import tool (Picasa) does a great job at importing photos and videos from my phone and camera. What I like is that it creates a subfolder under the Pictures directory based on the Photo Taken ...
crichavin's user avatar
  • 4,722
0 votes
1 answer
780 views

Copy third party dependencies on build // Post-build events not working // Any alternatives?

I've got a .NET solution which relies upon a third party API. The API appears to mostly be an interface which depends on other files (sqlite, dlls, license, etc.). The third party classes are used ...
Switch386's user avatar
  • 462
0 votes
2 answers
2k views

PowerShell to copy files to destination's subfolders while excluding certain folders in the destination

So I have danced with this off and on throughout the day and the timeless phrase "There's more than one way to skin a cat" keeps coming to mind so I decided to take to the community. Scenario: ...
Charlie Echo's user avatar
0 votes
2 answers
2k views

robocopy or xcopy: copy directory and files

I want to use either robocopy or xcopy to copy a directory and its contents to a remote share. I have attempted this: xcopy /E /V /C /I /H /Y "foo" \\172.16.254.41\c$\temp foo\file.sql foo\file2.cmd ...
Registered User's user avatar
0 votes
2 answers
92 views

Trying to set the path in batch file

I am trying to copy some pictures from one folder and move it to another folder using batch. I am having trouble in setting the path since the path contains spaces in it.If I remove the spaces from ...
Ebad Ali's user avatar
  • 600
0 votes
1 answer
373 views

Conditionally Copy Dependencies MSBuild

We have our solution set up so that Project A References Project B, Project B references Project C, and Project C has a .NET wrapper that references native DLLs. A -> B -> C -> Native DLLs ...
Clark's user avatar
  • 488
0 votes
4 answers
12k views

copy paste files using CMD

I want to accomplish the following: copy File A from Directory A to Directory B but File A already exist in Directory B and i don't want to overwrite it, simply put the new file in Directory B with a (...
Adal Raja's user avatar
0 votes
2 answers
62 views

Issue dynamically finding a USB and backing up to it?

need some help with coding, I'm trying to write a bat file that, when fired, will look for a USB drive and then copy a directory to it. And if the USB isn't plugged in, it will sit and wait for the ...
Julian White's user avatar
  • 1,703
0 votes
2 answers
48 views

Invalid number of Directories on Batch

I wanted to copy a few files into subdirectories inside a single directory. I'm using batch btw. So far this is my code: FOR /D %%A In ("C:/.../Desktop/exampledirectory/*") DO xcopy C:/.../Desktop/*...
SirCats's user avatar
0 votes
2 answers
1k views

How to Copy files that are in a directory to another directory recursively in Windows?

I have to create an script to copy files from a folder structure to other. My source folder structure is similar to this: -RootFolder --ParentFolder1 --SubParentFolder1 --ToCopy ...
Dzyann's user avatar
  • 5,099
0 votes
1 answer
729 views

batch - conditional statement with xcopy

I need to send an email to a submitter if a copy fails. For example my code is this: echo F|xcopy "%src_dir%" "%tgt_dir%" 1>>"%logfile%" 2>&1 echo Success: ...
staples's user avatar
  • 424
0 votes
3 answers
446 views

Xcopy folder selection

I would like to make an automated task by using a .bat file in order to copy some files from the server to users' computers. The destination of the files can be on different partitions but the ...
Alex M's user avatar
  • 73
0 votes
2 answers
1k views

Batch: Empty Folder and then Add Files?

I'm trying to create a batch file that will empty the contents of directoryX, and then copy all of the contents of directoryZ into directoryX. Will this work on Win8?
curtisupshall's user avatar
0 votes
3 answers
2k views

Excluding a folder in a recursive copy in Batch

Basically what's going on is that we are migrating about 50 desktops from XP to 7. I cannot install any extra programs to complete this task. What I am doing is writing a script that copies the ...
Flynn's user avatar
  • 193
0 votes
1 answer
414 views

xcopy files recently moved to a folder, but not otherwise modified

I have users uploading images into a folder. Sometimes the modified date is not recent at all. When these images are created in the upload folder their creation date is a recent date however. I ...
datatoo's user avatar
  • 2,039

1
6 7
8
9 10
16