I wrote a script that checks to see if a folder exists, and if so, empties it. it then waits 5 seconds, then proceeds to recopy new (or maybe the same) files back into the folder.
When the folders don't already exist, it'll take 15-20 seconds to copy the files. but when the folders already exist, I can watch them being emptied, I see it wait, then I see it zip through the copy commands in less than 1 second. And the files show up in the list.
Can someone explain this to me? It would almost appear that the copy is actually looking to see if the file HAD existed, and if so, if it was somehow identical, it just restores the file rather than recopy it.
I haven't tested the "restore" theory, but wanted to know if this was even probable (it's scary either way).
I added the 5 second pause thinking that maybe the drive needed time to stabilize.
Thanks in advance.
Example of script:
if exist c:\some\folder erase /q c:\some\folder erase /q C:\another\folder\file*.exe ping -n 6 -w 1000 127.0.0.1 > nul copy /y some\folder\sample.exe c:\some\folder\sample.exe copy /y another\folder\file001.exe c:\some\folder\file001.exe
make your test files large so they take time to copy, and you'll see what I mean.