mcompton69
asked on
Xcopy: How do you NOT over write existing files (skip existing files).
I am trying to copy some files into the %SYSTEMROOT%\system32 folder.
I DO NOT want to over write any existing files (skip existing files).
I need to include this command in a batch files. I have gone through all the xcopy commands, but there does not seem to be one, how the heck do i do this??!!!
All machines that this command will be run on are on XP.
I DO NOT want to over write any existing files (skip existing files).
I need to include this command in a batch files. I have gone through all the xcopy commands, but there does not seem to be one, how the heck do i do this??!!!
All machines that this command will be run on are on XP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or xcopy /-y which will prompt you to overwrite. Ok for a few files but if you have loads its a pain, but safe.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks all for your help. Sorry i can only split points between 2 of you because minimum points total is 20 so i have rewarded the 2 that are most relevent to me.
no problem, glad to assist.
had to post, this topic should have been really easy but i dont like any answers anywhere until i found below:
echo n|xcopy "source\*.*" "destination\*.*" /d/i/e
i use this to backup a folder and all subfolders but only files that do not already exist in the backup. useful for multimedia backup (ie, files themselves will never change)
it will 'ask' about overwriting an existing file but we pipe the n character to the stream and tell it to only copy files that dont already exist =)
echo n|xcopy "source\*.*" "destination\*.*" /d/i/e
i use this to backup a folder and all subfolders but only files that do not already exist in the backup. useful for multimedia backup (ie, files themselves will never change)
it will 'ask' about overwriting an existing file but we pipe the n character to the stream and tell it to only copy files that dont already exist =)
'n' is not recognized as an internal or external command, operable program or batch file. - that's what I get when I try to "pipe the n character"
n|xcopy "\\dhssqlcc\R$\Microsoft SQL Server\MSSQL.1\MSSQL\Backu p\KinderTr ack Backups\*
.bak"
n|xcopy "\\dhssqlcc\R$\Microsoft SQL Server\MSSQL.1\MSSQL\Backu
.bak"
concretesailors: it doesn't appear you are issuing the echo call
echo n|xcopy "\\dhssqlcc\R$\Microsoft SQL Server\MSSQL.1\MSSQL\Backu p\KinderTr ack Backups\*
.bak"
echo n|xcopy "\\dhssqlcc\R$\Microsoft SQL Server\MSSQL.1\MSSQL\Backu
.bak"
oh, you are correct.
I wasn't using the echo call. Thank you.
I wasn't using the echo call. Thank you.
http://www.ss64.com/nt/robocopy.html
/XO