Questions tagged [xcopy]
The xcopy tag has no usage guidance.
196
questions
0
votes
1
answer
28
views
Copy several files listed in a text file to a new folder when list file contain different paths
I would like to copy several files (with different paths) in one folder.
I tried this solution explained here page of example on stackexchange
but when I run the file (I choosed .bat file) I have &...
6
votes
2
answers
2k
views
RoboCopy slower than Xcopy? (Windows 10)
I'd been using xcopy in a backup script but every so often xcopy would fail with "insufficient memory" when a pathname would sneak into the backup set that exceeded 254 characters. Lots of ...
0
votes
0
answers
164
views
How to use xcopy to copy files from a compressed NTFS folder to the root of a FAT32 volume?
I am having problems using XCOPY to copy folders and files from a compressed NTFS folder to the root of a FAT32 volume (actually a USB drive).
This looks like a Windows or Xcopy bug to me. The command ...
0
votes
0
answers
79
views
Is my batch script to replace program files on startup with rmdir and xcopy not working properly?
I'm trying to work my way around a program that's giving me some problems.
It has to fire up every day and do it's thing, but rarely does - losing data and breaking very frequently.
So to counter this,...
0
votes
1
answer
747
views
How to use xcopy with /exclude in a network path with spaces?
I want to use xcopy on a network path. I actually do.
The problem is that I wanted to use an /exclude option. But the file would be in a network path. But the network path has spaces (s:\my path).
So ...
1
vote
1
answer
254
views
Is it possible to make XCOPY only copy the files from a source if they are older than the ones in the destination?
Is it possible to make a batch script only XCOPY the files from a source if they are older than the ones in the destination? I'm trying to archive Roblox versions. I tried /D, but that just makes it ...
1
vote
1
answer
506
views
Does the xcopy command on Windows provide a safe means of backing up data?
I recently backed up the data on my computer, using the xcopy command. I briefly looked through some of my backup files and directories, and they looked the same as the originals. However, I ...
1
vote
1
answer
904
views
xcopy only newest file to a subdirectoy
I have a batch file that runs when I build my solution in VS2019. The .bat file uses xcopy to copy .dlls from my project's Debug folder to another destination direction.
I want to use xcopy to copy ...
2
votes
2
answers
1k
views
Is there Windows copy command that mimic Unix `cp -r` behavior?
I don't know how to name this behavior vividly, just call it loyalcopy.
Two figures will illustrate it clearly.
I'd like to issue two commands to copy two filesystem nodes (regardless it is a file ...
1
vote
0
answers
666
views
Purpose of xcopy over robocopy
From what I've found online, robocopy seems to be xcopy with more features; are there any scenarios where someone would want to use xcopy over robocopy?
2
votes
1
answer
527
views
Change extension for all files in a folder & its subfolder
I am using XCOPY the following successfully copies the entire contents of
\MY SKETCHES 2021 to \My Sketches (TEXT).
This is my command:
xcopy C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\My ...
0
votes
1
answer
157
views
Batch file not getting the first 5 characters in drop file filename
I created a simple batch file that copies drop file in specific folder. This my batch script:
rem This will create a BACK-UP DATA Folder in Desktop
rem with a SUB-FOLDER which filename must be the ...
0
votes
0
answers
124
views
for command does not allow move or xcopy command to move/copy the folder only the contents
have looked on this forum for several examples, started off with xcopy ( not allowing wildcards in the folder name ), wanted to pipe the dir command to either xopy or move but require the dir ...
0
votes
1
answer
918
views
Invalid drive specification - Xcopy with long path names - \\?\C:\Some\Really\Long\Path
I'm unable to use the above mentioned convention.
The command that I'm using:
Xcopy \\?\c:\108 \\?\c:\108_2 /e /h /r /y
An error invalid drive specification is received. What am I missing
0
votes
1
answer
61
views
copy folders and content to a external drive
i have this
for /F "delims=" %%a IN ('dir /b /s /ad "*"') DO ( FOR /F %%c IN ('dir /b/s "%%a\*.txt" ^') DO XCOPY "%%a" "J:\" )
but it only moves the ...
2
votes
2
answers
525
views
XCOPY file verification fails on a symbolic link but diff shows now difference between files
I'm performing an xcopy backup of a disk on Windows using the following command line:
xcopy "d:\" "r:\" /v /h /k /e /b /d
I know that the verify switch doesn't do much but a file ...
1
vote
1
answer
357
views
copy big file to multiple locations at the same time
I am trying to use a CMD command prompt to copy a big file (1.5G) from one location to multiple destinations at the same time. Is there a way to do this using COPY/XCOPY etc? I haven't been able to ...
2
votes
1
answer
51
views
Copy files except when destination modified in last x days
I think what I am trying to do is simple, but I can't get the robocopy settings right, as I am trying to copy files from src to dest, over-writing files in dest if they already exist, except if ...
0
votes
1
answer
219
views
Does XCOPY leave credentials cached in LSASS?
When using XCOPY to copy files to a remote machine, are your credentials used to connect to the remote machine cached in the LSASS of that machine?
I am trying to avoid leaving any credentials ...
2
votes
1
answer
13k
views
How rename files copied via Robocopy if it exist but with different modify date
I'm using Robocopy to copy files from a folder to another, i think my code will overwrite the file if it was existing on the destination folder and the timestamp was different, what im trying to do is ...
0
votes
1
answer
68
views
How to schedule a backup for only the new added files?
I'm a Windows user and wondering: how can I do a backup for the files on a specific folder if the files are not older than x days? Or to backup only the newly added/modified files without doing a full ...
0
votes
1
answer
81
views
xcopy only working if I use /F to display full filenames
I was initially just using copy but I got this output:
C:\repos\AutomatedBuildTesting (master -> origin)
(2020-09-18 8:49:01.12) λ copy ".hooks/*" ".git/hooks/*"
commit-msg
The ...
0
votes
2
answers
2k
views
XCOPY only files from a parent folder and from all its subforlders to a new folder in Windows?
I was searching a lot of times how to copy all the files of different extensions from a folder and all its subfolders to a new folder without copying the folders itself using Batch File. I mean ONLY ...
1
vote
1
answer
42
views
What's going on with xcopy /d
What exactly is under the hood of the /d flag? what is the code doing? Reason I'm asking is that I can't tell definitively if /d is reading the entire file from source or just some header. Thank you!
1
vote
0
answers
399
views
xcopy in task scheduler ends with error 4
I created a task in task scheduler to copy a specific file to a server each midnight. When I run the command normally in command line it works fine, but the task always ends with exit code 4 and the ...
8
votes
1
answer
10k
views
How to predefine file/directory parameter to xcopy
I need to run xcopy command. But when I type it with all parameters:
xcopy \\<server>.<domain>.com\c$\Users\<user>\Documents\New_ADuser_mustang.ps1 C:\IAM\New_ADuser_mustang.ps1 /C /...
1
vote
1
answer
466
views
Batch file with xcopy runs correctly called from cmd but not with double click
I'm testing a solution for a user getting access denied when running a scheduled backup batch script or by double-clicking it.
I've noticed I have the same issue for a simple xcopy call. Specifically,...
2
votes
2
answers
614
views
xcopy.exe exists in every Windows system?
Can I be sure that xcopy.exe exists in every Windows system (7+) and that it can always be found in the system PATH (e.g. C:\windows\system32)?
0
votes
1
answer
230
views
Receiving an Error when Copying file over
I have a script that i run against 1K systems. In the script I copy a file over to the systems' temp folder. 1 or 2 systems out of 1K systems return an error of "Invalid drive specification" when I ...
-1
votes
2
answers
542
views
Properly expand copied file names using XCOPY
I've made a batch script that is set to copy all .cpp files from a location I have set. It can copy the files and retain the folder structure, but it isn't expanding the copied file names properly. I ...
1
vote
1
answer
1k
views
Robocopy Hangs / Gets Stuck - Move to Next File Command/Timer?
I have an issue when I utilize Robocopy. I have a fairly homogeneous directory and I am trying to move it from one drive to another. The drive where the files reside must be corrupted. I would ideally ...
1
vote
1
answer
3k
views
Xcopy jpg files from subfolders of "%~dp0" using wildcard
I have one folder on my desktop Test, and in this folder I have two folders, WorkingFolder\Bilder and Station 1. So the structure looks like this:
Test\WorkingFolder\Bilder
Test\Station 1
Within ...
0
votes
0
answers
78
views
Taking backup of files using XCOPY
I have a file_list where the paths of the source files are saved.
ex:
file_list
-c:\SAY\hello\world.txt
-c:\SAY\hello\New\file.txt
Using for loop i tried copying the files which are in the ...
1
vote
1
answer
8k
views
How to copy entire folders/directories in command prompt?
My laptop isn’t booting, so I’m running a Windows ISO off a DVD and attempting to backup some files to an external hard drive plugged into the USB via Command Prompt.
With command prompt I can enter ...
0
votes
1
answer
2k
views
Copy files from one folder to another using a pattern based on input file in Windows
I need some help using for and xcopy to move files from one folder to another based on an input text file. What I need help with is matching files based on a pattern.
My input file looks like this: ...
0
votes
1
answer
3k
views
Can't Copy To Network Drive Using XCopy
I'd like to copy the contents of D:\Documents (a folder on a local hard-drive) to Z:\Documents (a folder mapped to a NAS device).
xcopy.exe D:\Documents Z:\Documents /d /s /y
/d - copies all Source ...
1
vote
1
answer
3k
views
Does appending (merging) files together work with XCOPY?
I want to merge multiple (text) files having the same prefix into a single file. This task is part of a whole batch (in VBScript) but due to performance expectations, I'm more likely to use a native ...
1
vote
1
answer
4k
views
Copying files based on creation/modified date
I have a question about backing up files from the command line. We have a shared folder (stored on one of the computers) in the office containing several thousand files and subfolders. Until now, I've ...
0
votes
1
answer
2k
views
How to generate a logfile using xcopy with task Scheduler - no bat file
I'm updating some files every day with task scheduler using xcopy. My syntax is
xcopy "\\networkFolder...\" "c:\folder" /D /Y /E /I > c:\users\name\desktop\logfolder\log.txt
It works perfectly ...
0
votes
1
answer
10k
views
Moving files to FTP in batch file and delete source files
I need to create batch script for copy files from PC to FTP server. After copy - delete all files from source. And in destination directory overwrite all existing files.
I found many solutions, but I ...
0
votes
2
answers
556
views
Folder Size after copy way too big
I have been trying to copy the DESKTOP folder of a User for backup purposes, but once it finishes its way to big.
Source folder size is 21.0GB on properties (55k files)
Destination folder after copy ...
0
votes
1
answer
5k
views
Copy files with full relative path in Windows
I have a large set of files (45,000+) in a pretty complex folder structure. I extracted a subset of ~13,000 files and their paths (relative to the root folder) that I want to copy with the original ...
0
votes
0
answers
557
views
Xcopy a whole folder [with all in it] ...BUT, how do I make Xcopy create a different folder every time or ask to create a new or overwrite?
I explain.
I have this short .bat file to copy a 'folder' with all contents and it does create the folder named Source_folder with all contents.
When I re-run it, Xcopy obviously find that folder ...
0
votes
0
answers
1k
views
Accessing Remote Desktop and Copy file from Remote Desktop to Local System using xcopy?
I am using Windows OS and accessing Windows server through a remote desktop connection. I want to run a exe file on Remote Desktop and store the results in a .csv file. Now I want to copy that result ...
0
votes
1
answer
355
views
Batch to move file into sub directories excluding parent directory
I have a *otf file that I would like to copy into all the sub directories of the parent folder. This is what I have attempted.
for /R %%x in (.) do copy "file.otf" "%%x"
This works for the most part ...
0
votes
0
answers
555
views
XCopy error code doesnt tally
i have a xcpoy command which copying content in a folder to another directory via Windows Task Scheduler. However, recently we noticed there were not some events, the xcopy doesnt really copying / ...
0
votes
1
answer
396
views
Copy calendars items without prefixing subject line with "Copy: "?
I'm trying to drag all items from a calendar in one PST file to a calendar in another. I am prompted to Choose between "Copy", "Copy Series", "Copy Occurrences". No matter what I choose, the subject ...
0
votes
1
answer
44
views
Attempt To Use Batch Files While Keep Structure
I wanted to use robocopy, but it is not possible due to my text file has filenames attached.
I ended up have to use copy instead.
I wanted to copy files like this...
Source: S:\folder\A\B\C\D\E\...
2
votes
1
answer
505
views
xcopy invalid parameters - copying all files in folder
for /R "c:\" %f in ("*.pdf") do xcopy %f "%USERPROFILE%\all\text" /s /c /d /e /h /i /r /y
This is the command I am using to copy all of the .pdf files on my computer into one folder. However, it does ...
0
votes
0
answers
342
views
Windows 10 xCopy Over Network
We have a Windows 10 box here that's been running a batch file that runs an xcopy on a folder with subfolders. It's been running happily for years, but last week, on 12th December, for no apparent ...