0

Windows displays "Undo Rename", "Undo Delete" or "Undo Move" in the system Context Menu since you do any of those recent changes to some file!

I have created a program which rename specific file chosen by the user, using My.Computer.FileSystem.RenameFile method in VB.net.

My.Computer.FileSystem.RenameFile("C:\Test.txt", "SecondTest.txt")

But "Windows" couldn't detect the changes.

It's not to give this option "Undo Rename" in my program, but to let "Windows" detects the changes to give an option to Undo them via the system Context Menu!

1 Answers1

0

It is not "Windows" that is tracking that change it is the "File Explorer" program (it tracks changes that are made from within that program).

I don't think there will be any way to tell File Explorer that you have made a change to a file and add the undo action to its list.

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143