Questions tagged [xcopy]
The xcopy tag has no usage guidance.
198
questions
2
votes
2
answers
3k
views
Xcopy: why /x (System Access Control List information)
I can't get more info about the /x switch than:
This option copies file audit settings and System Access Control List
(SACL) information. You imply /o when you use the /x option.
I am trying to ...
2
votes
1
answer
16k
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 ...
2
votes
2
answers
731
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)?
2
votes
1
answer
1k
views
What's wrong with my XCOPY line?
I'm trying to write a batch file that will copy all new files from a source to a destination without prompting (it will be running on a server). This script will not copy files that already exist in ...
2
votes
3
answers
2k
views
Running a certain XCOPY command without user interaction
I am trying to run the following command in Windows CLI:
XCOPY Z:\.vimrc %USERPROFILE%\_vimrc /H
The /H part needs to be there because Z:\.vimrc is a hidden file.
When I run the command above, I ...
2
votes
2
answers
23k
views
xcopy and invalid drive specification
I am trying to use xcopy and it always returns with invalid drive specification
xcopy "C:\socp.tar" "\\FMDX1024\C\socp.tar"
FMDX1024 is a machine on the network.
any clue?
2
votes
2
answers
660
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 ...
2
votes
1
answer
222
views
Share a folder with user 'Everyone' without asking to login?
I shared a folder on a WinServer2012 with username 'Everyone' for read/write. From XP it doesn't ask for login, while from Win7 login box pops up.
How to accomplish to not being asked from Win7 too? ...
2
votes
1
answer
24k
views
XCopy encounters a sharing violation, how to handle
I'm using xcopy for copying large bundles of files. One thing I particularly like about xcopy is the /F switch which shows all source and destination files, paths included, something like:
xcopy /E /...
2
votes
1
answer
1k
views
batch copy folder located by guid
In a batch file, can I copy a folder located by a constant path like \?\Volume{GUID}?
When copying (copy, xcopy or robocopy) a directory and its content from a local removable drive (a usb external ...
2
votes
1
answer
20k
views
How to use Robocopy to copy a folder structure into all (sub)folders located under one directory?
Is there anyway for me to quickly take an empty folder structure I have created on my desktop and copy it to 488 other folders all located on a network drive but in the same folder?
My primary ...
2
votes
1
answer
1k
views
XCopy on server?
Normally, on my website, files are either handled by WordPress or by me doing FTP.
I'd like to copy my entire site to a new folder. I don't want to copy it down to my local drive (with wget) and then ...
2
votes
1
answer
537
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 ...
2
votes
1
answer
807
views
Batch File XCOPY Invalid number of parameters
I'm trying to create a backup batch file, it's been a number of years since I last did one and I'm having a bit of trouble.
I am creating a folder in one location with the date and time in the folder ...
2
votes
1
answer
435
views
copy file in 8.3 format produces "There is already a file with the same name in this location" error in windows 7
I use xcopy and batch scripting to backup newer files xcopy "src" "dest" /O /X /E /H /K /I /D. I was asked if I want to replace something which should not happen. So I did the copy process manually ...
2
votes
2
answers
9k
views
Administrator getting "access denied" - unable to create directory
As far as I can tell, I am in the Administrators group on Windows 7 Service Pack 1.
With CMD prompt pinned to my Start menu, I rightmouse and select Run as Admin and get this error on xcopy:
C:\&...
2
votes
2
answers
2k
views
How to Copy File and Folder permissions but not folders and files?
I have two copies of same folder in windows. but the permissions of one of them are missing.
How can I copy permissions of the original source to other?
I know I can use the xcopy command but the data ...
2
votes
2
answers
283
views
How do I automatically copy data when attaching external storage?
If I am correct to assume that once I place a DVD/disk in my optical drive (or use a USB flash drive or external HDD for that matter; for arguments sake) that this action would in effect trigger an '...
2
votes
1
answer
824
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 ...
2
votes
1
answer
65
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 ...
2
votes
2
answers
2k
views
copy array in a batch file
I have several files located across several directories/subfolders that I need to copy to several destinations. I currently do this using xcopy but I do it line by line, so there are several lines of ...
2
votes
0
answers
3k
views
How can I specify an /EXCLUDE file with spaces in it to xcopy?
I have tried to specify an /EXCLUDE filename with spaces in it to xcopy, but it always chokes. How can I specify such a path to xcopy without copying the /EXCLUDE files into the current directory and ...
2
votes
1
answer
365
views
XCOPY Copied files and folders as a file
Today i had some problems with a laptop, and i had to reinstall the windows on it, while i was in the recovery console, i used XCOPY batch command to copy files and folders from c:\users\USERNAME\*.* ...
1
vote
3
answers
22k
views
Can xcopy make a bootable copy (clone) of Windows?
Following on from my discussion with @JustinD in the comments here, is it technically possible to simply xcopy the contents of a Windows partition to a partition freshly created and formatted on a new ...
1
vote
2
answers
899
views
Copying files from somewhere within a directory tree to a folder
I have a mirror of a large website that I need to reorganize, most of the images and files I've been able to programmatically move and relink up; however, there are a few (few is a relative term, we'...
1
vote
2
answers
3k
views
Getting access denied on the destination drive partition after using xcopy
I wanted to copy the all the files in a folder including its sub-folders from one hard drive to another
I tried this xcopy command
C:\Documents and Settings\rakesh>xcopy "D:\Ganesh Drive\Trimax ...
1
vote
2
answers
4k
views
How to copy directory structure, by only two levels but not the third?
From XP's Command Prompt, I am using XCOPY to copy directory structure of s:\bloo\"[8family]\"[30-40genus]\"[5species]\ and want to limit the structure to just the genus and families, and ignore the ...
1
vote
1
answer
670
views
How can I keep XCOPY from copying more than it should?
I have a script for copying files from one folder to another. The XCOPY command looks like this:
XCOPY /E /Y /V /D:%date% %reportsDataPath% TMP\
The date flag is supposed to make it copy only files ...
1
vote
2
answers
4k
views
How can I merge two directories in Windows and have the result contain the most recent files and directories?
I believe this question to be very simple however I want to triple check before I screw myself up. My testing has shown this process to work (I think, but I may be missing something) but again I'd ...
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
2
answers
2k
views
How to maintain relative symbolic links during copy?
I have a directory structure with a bunch of relative symbolic links. Example:
e:\test
e:\test\foo\a --> "..\bar"
e:\test\bar\b --> "..\foo"
Is there a way to copy the entirety of the directory from ...
1
vote
1
answer
11k
views
Batch file to only copy new files from source to destination [closed]
I am trying to create a batch file that copies only new files to another folder. I have .png files that come in through FTP at various times throughout the day. So I am looking for a .bat that I can ...
1
vote
2
answers
10k
views
What's the correct syntax for using an IP address in xcopy?
I want to copy a set of files on a Windows computer to a number of Windows servers I have credentials for without having to go through RDC, theoretically a simple task. For this usage, the appropriate ...
1
vote
1
answer
3k
views
How to avoid XCopy run into the error: The process cannot access the file because it is being used by another process?
I am xcopying data from my local directory to a shared windows drive. Once in a while i get an issue where in the middle of copying i see the following error:
The process cannot access the file ...
1
vote
1
answer
308
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
1k
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 ...
1
vote
1
answer
106
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
1
answer
9k
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 ...
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 ...
1
vote
1
answer
727
views
Copied empty folder on top of C:\ using xcopy - what happened?
I was testing xcopy on Windows 10 for use in scripts and, in haste, I run:
xcopy /s /e /y /x "%~dp0/aaaaaaaaaa" "C:/"
where aaaaaaaaaa is an empty folder.
/s /e /y /x does the copy recursively, ...
1
vote
1
answer
1k
views
Copy subfolders and their content up one level?
Right now I have the following structure
Folder 1\
-Apr2007\folder 1
\folder 2
\folder 3
-May 2007\folder 23
\folder 24
\folder 25
...
1
vote
1
answer
1k
views
Windows XCOPY results from FIND command
Windows 7 CMD
I can retrieve a list of files by the following command dir /b | find "TENDER_NUM 2". I'm trying to copy all the files that were returned by find into another folder.
I've tried:
for /...
1
vote
1
answer
4k
views
Windows cmd copy directories and content recursively if the files do not exist
The question fits in the title:
I want to copy from local storage to a network storage directories and their content, but only the new or updated files with no prompt.
My idea would be to use xcopy
...
1
vote
1
answer
2k
views
"Copy but keep both files" but only for files with different timestamps
I'm trying to consolidate 5 very similar but slightly different tree structures into a single one but not lose any modified data.
So, I need a solution that will:
1. Copy files that exist in the ...
1
vote
3
answers
5k
views
Batch file, copy files beginning with (A,B,C,D,E)
Instead of running xcopy 6 times, is there a way to define an array of files to copy?
xcopy \\\from_location\\(A,B,C,D,E)*.txt \\\to_location\
1
vote
2
answers
238
views
Copy Windows directory, including specified directory
I want to copy the directory itself, not only the contents.
For example I have
C:\DirA\SubDirA\FileA
I want to copy DirA into DirB so that I have
C:\DirB\DirA\SubDirA\FileA
Here's what I've tried
...
1
vote
1
answer
315
views
Is the order of options for xcopy command important?
Is there a difference between these two lines?:
xcopy C:\source X:\destination /s /d
xcopy C:\source X:\destination /d /s
I've noticed that with the first one I also copy newer files in subfolder, ...
1
vote
1
answer
727
views
Copy my documents without rename in windows 7
All,
Occasionally I use xcopy or robocopy to copy my documents folder as a backup. The issue is no matter what I name it, say MD_Backup, Windows always renames it to My Documents. I'd really like it ...
1
vote
1
answer
410
views
Xcopy batch file behavior
I have the following backup batch file:
xcopy C:\test.txt \\server\Data\user\"data test" /e /y /i
Why does it not only copy the file listed but proceeds to copy the whole root directory?
When I ...
1
vote
0
answers
964
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?