Copy Command is Deleting Files

I am performing a SQL backup and copy between servers using bat files and Task Scheduler.
I create the backup files, then copy them from one server to another.  The copy command copies all existing files; I use clear commands to remove older files.
The backup is working properly, but the copy command is deleting existing files selectively on the receiving server.  For example, a file from1/1/2013 is there on 1/2, but missing on 1/7. Other files from the same day remain.
I have disabled the clear commands, so how is the copy command deleting files?
Backup-a.xlsx
fhcdaverpresidentAsked:
Who is Participating?
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
"Is it possible that intermittent transmission errors in the midst of the copy/overwrite of existing files are deleting existing files without successfully replacing them?"
I don't see how.  Moreover, if you're sure the files exist at some point, then are deleted, I fail to see how the copy command could be responsible for that.  

Is there a separate clean-up process?  Are you unwilling or unable to audit file access/permission use to see when these files are being deleted?
0
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
And no human has access to the place where the files are being copied?  No other process deletes files from there?  

I'd turn on auditing and see who's doing what.
0
 
fhcdaverpresidentAuthor Commented:
I'm confident no person is doing it, and don't see any other processes.  

Is it possible that intermittent transmission errors in the midst of the copy/overwrite of existing files are deleting existing files without successfully replacing them?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Bill PrewCommented:
When the batch file runs that does the copy, does it ever report any errors from the copy command?  If not I'd be surprised if it was deleting the files.

You might want to add a DIR of the destination folder at the start and end of the BAT file to try and see if the files go missing as a result of it running.

~bp
0
 
Lionel MMSmall Business IT ConsultantCommented:
What are the names of these files, naming rules--is it possible old and new files have the same names and so when copied replace an existing?
0
 
fhcdaverpresidentAuthor Commented:
I will try the auditing.
0
 
Bill PrewCommented:
So, just curious, what was the source of the disappearing files, and how did you resolve it?

~bp
0
 
fhcdaverpresidentAuthor Commented:
I have not figured out the problem, so we are going to monitor the situation and see what happens.  if we discover the cause, I will post it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.