Link to home
Start Free TrialLog in
Avatar of johnj_01201
johnj_01201

asked on

120,000+ files vanished

I left a Powershell 4 script running overnight. It had 9,000+ files created (from copy-item).
I came in this morning and the program had stopped with an error, but the console output told me there should be over 121,000 files in the new location, but there were only 649!!!

This is a Hyper-V generation 2 virtual machine running Windows 2012R2 and the SQL 2012. There is no DELETE\REMOVE anything in my Powershell script, only create-item for a folder if it does not exist and copy-item to move files from numerous places to one folder.

I was not able to find anything about missing files in Google with 2012R2.
I'm running it again and will find out if it happens in 2 days. The VM guest shows 53GB free and is a dynamic disk.
The VM is exported each night for backup.

Any ideas?
thanks!
Avatar of Jeremy Weisinger
Jeremy Weisinger

Can you post the script?
What is the reported size of the disk?
How much space is used in the directory?
Can you run something like WinDirStat and verify that the files are not actually there?
Avatar of johnj_01201

ASKER

Can't post the script, it is almost 1,000 lines long now.
The files are gone, as in permanently deleted somehow.
Recycle Bin was empty and the disk free and used space showed as if the files were not there. There should only be about 10GB free when the program completes.
It is running again and I'll let you know how it turns out this time.
ASKER CERTIFIED SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial