rlv-dan / PhotoSift

Quickly organize unsorted images into folders using the keyboard
GNU General Public License v3.0
47 stars 8 forks source link

Refine Recycle I/O #8

Closed yfdyh000 closed 4 years ago

yfdyh000 commented 4 years ago

use VisualBasic.FileIO, fix the window title bar blink while deleting. Partial repair Restore from Recycle not work in Non-English locale OS, e.g. zh-CN. Note: I haven't tested it on English Windows, please confirm it works.

yfdyh000 commented 4 years ago

In addition, I suspect the current Undelete is unreliable for items with different deletion times but same path, the file content may be different for a few users.

If the undo queue supports, comparing some meta info may be helpful, especially DateDeleted. I haven't checked this yet. Reference example:

  WScript.StdOut.WriteLine(item.Name);
  WScript.StdOut.WriteLine(item.ExtendedProperty(
                                "System.Recycle.DeletedFrom"));
  WScript.StdOut.WriteLine(item.ExtendedProperty(
                                "System.Recycle.DateDeleted"));
  WScript.StdOut.WriteLine(item.Size);