0

I have a very vital folder that is being "infested" with unknown files. The 500,000+ files have HEXadecimal Names and most of them are 0 bytes each. This is how the files names look like.

:
08/28/2019  04:20 PM                 0 70F55530
08/28/2019  09:00 PM                 0 70F55630
08/28/2019  04:37 PM                 0 70F56530
08/28/2019  04:55 PM                 0 70F57530
08/28/2019  09:34 PM                 0 70F57630
08/28/2019  05:12 PM                 0 70F58530
08/28/2019  09:52 PM                 0 70F58630
:

I did a virus scan but found nothing. Incidentally, my original files are still in the folder.

I have tried deleting the strange files via git-bash:

find . -type f -name "[0-9]*" -delete

and also

find . -type f ! -name "*.*" -delete

but it takes so long.

I'm not sure of the regex to use and I don't want to delete my real files and folders. Is there a faster way of removing only those files with the hexadecimal names?

Drk
  • 121
  • 7
  • 7
    You don't seem adequately concerned about the source of these files. – I say Reinstate Monica Oct 21 '19 at 11:49
  • 1
    are there other files in the folder that you need to keep? If not, how about a simple `del *.*`? – LPChip Oct 21 '19 at 11:53
  • @TwistyImpersonator which were created nearly 2 months ago... – spikey_richie Oct 21 '19 at 12:04
  • I am very concerned @TwistyImpersonator - that's why I did a malware scan and also made restoration points. At first I thought it was ransomware but my original files are still in there.. – Drk Oct 21 '19 at 12:06
  • The huge number of files makes it so hard to browse the folder. What I'm sure of is these files are only in that one folder... – Drk Oct 21 '19 at 12:10
  • All I need is a quick solution to delete the strange files @spikey_richie – Drk Oct 21 '19 at 12:11
  • Try `del ????????.` - this command will delete all files which have the name 1-8 chars long without the extension. Of course check that there is no such files which must NOT be deleted. – Akina Oct 21 '19 at 12:55
  • NTFS is slow. No way around that. // Related: https://superuser.com/q/19762/219095 – Daniel B Oct 21 '19 at 12:56
  • I use this in your situation....https://emcosoftware.com/unlock-it – Moab Oct 21 '19 at 13:06
  • Use the Command Prompt and not git-bash. – harrymc Oct 21 '19 at 13:18
  • Thanks @Akina. This takes sometime but at least it shows which files its removing – Drk Oct 21 '19 at 13:50
  • *at least it shows which files its removing* `dir ????????.` shows too, but it may be faster, especially with /B option. And its output may be saved into a file. – Akina Oct 21 '19 at 13:53
  • Thanks @Akina. I ran your first option for ~5 hours and they were still alot more left. I resorted to using git-bash for the remaining ~200,000 files and ```find . -type f -size 0b -delete``` ran for less than one hour. I'm so glad my files are still there even though I failed to understand the cause of the issue... – Drk Oct 22 '19 at 00:48

0 Answers0