I'm on Windows 10.

I wrote a script in python that was supposed to sort my downloads folder by the extensions (create a new folder for every extension and move every file with that extension in there), but I created the folders in the wrong directory and ended up moving files into non-existing directories (using shutil.move()), which lead to this.

These files are not directories and I can't click on them to view what's inside.
I tried opening these files using

  • 7zip
  • explorer.exe from C:\Windows
  • the windows command prompt (cd iso for example)

How can I turn these files into directories or undo the changes made by python?

  • Obviously you moved/renamed the files to their sole extension without the dot. To use the still present files (multiple files with the same extension are overwritten) rename back to any file name i.e. ren iso some.iso etc. – LotPings Feb 22 '19 at 18:04
  • @LotPings, no, I didn't rename the files. I've moved multiple files into these "folders". Edit: Oh. – tim-kt Feb 22 '19 at 18:23
  • Is there any way I can get back the overwritten files? – tim-kt Feb 22 '19 at 18:24
  • From your most recent backup? – LotPings Feb 22 '19 at 18:29
  • 1
    Well, I don't think there was anything important in my downloads folder and I guess this is a good time to start backing up my files, – tim-kt Feb 22 '19 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.