Code: Select all
v8.50.0020 - 2009-10-19 14:56
+++ Undo / Redo / Action Log.
------------------------------------------------------------------
Short version
Now you can undo/redo the file operations Move, Copy, Rename,
Delete, and New, and you get a detailed log about what you have
done and when.
Default Shortcuts: Undo (Ctrl+Z), Redo (Ctrl+Shift+Z)
Two things should be kept in mind:
(1) Undo only knows item names and locations, not data. It will
not restore lost data.
(2) Redo is not the Undo of Undo but it will redo the original
action.
------------------------------------------------------------------
Slightly longer version
Undo is your friend when something went wrong. This does not mean
it has magic powers. Everything undo can do you could also do
manually by yourself. Undo just does it faster and probably has a
better memory than you. It currently remembers your last 100
actions.
The probably most typical use for Undo is when you drag-moved some
items into the wrong folder, maybe by a slip of the finger. You
might don't even know which folder it was. With Undo, just one
click will bring everything back to normal. Even on the next
morning after having closed and restarted XYplorer.
What is logged and what can be undone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following operations are logged and can be undone/redone:
- Move: Move To, Cut & Paste, Move Here As (...), etc.
Note that a command like "Move to New Subfolder" consists of two
actions: (1) creating the subfolder, (2) moving the item. They
are logged (and undone) separately.
- Copy: Copy To, Copy & Paste, Copy Here As (...), etc.
Note that Undo will delete the copies for good. Redo will not
recreate the deleted copies but copy the originals again.
- Rename: Inline Rename, Batch Rename
Note that a Batch Rename operation is logged as one action and
can only be undone as a whole.
- New: Create New File/Folder, New Path, New Folders, New Items
- Delete: Delete to Recycler
Note that undoing a deletion of more than 5 selected items at
the same time will take much longer (depends on the number of
items in your Recycle Bin) than smaller numbers. This is caused
by certain Windows behaviors (at least under XP).
When you redo a deletion (i.e. delete again) there will be no
confirmation prompt.
When undoing a deletion results in a name collision you get an
overwrite prompt.
- Create Folder(s)/Branch(es) Here
Note that folders that should be created but were already
existing will be permanently removed on Undo.
- Create Shortcut(s): Paste Special, Drag Context Menu
- Rich Copy
Note that Undo will remove the copied items, but it will not
remove any created subfolders.
The following operations are logged but cannot be undone/redone:
- Delete: Delete (no Recycler), Nuke
No Undo because it's gone. Use recovery software to undo.
- Copy: Copy Here ("Copy Of...")
No Undo because of missing documentation.
- Backup: Backup, Backup To, Backup Here
No Undo because Backup is about overwrite/no overwrite. Either
it cannot be undone, or there is nothing to undo.
How to Undo
~~~~~~~~~~~
The recommendations for best Undo results are:
- Trigger Undo immediately after the logged action. The closer
you are to the action, the better your chances that it can be
perfectly undone.
- Start with the youngest logged action.
- Move through the action log in tight sequence (no skipping).
However, XYplorer's Undo grants you all kinds of liberties:
- You can pick out any logged action and (attempt to) undo it,
also known as non-sequential undo.
- You don't have to care about the original sequence of actions.
This does not mean, of course, that any sequence necessarily
works, but it *might* work.
- The action log is saved between sessions, so theoretically you
can undo actions that were done months ago.
Of course, since all logged actions are happening within one file
system, it should be clear that they are interrelated. So undoing
action #2 might be impossible before having undone action #1, or
undoing action #2 might make impossible to undo action #1 later.
Further Notes in Undo
~~~~~~~~~~~~~~~~~~~~~
- You can stop an ongoing undo/redo by pressing ESC.
Action Log
~~~~~~~~~~
The Action Log is the database for Undo/Redo, and it's a good
friend in case of human memory failure:
- The Action Log Dialog tells you in chronological order what you
have done, when you have done it, whether it can be undone, or
whether it has already be undone and can be redone. It also lets
you know what exactly will happen when you Undo or Redo an
action.
- Note that also actions are logged that cannot be undone. E.g.
no-recycle-deletions: you can still see what items you have
wiped and when; information that can be very useful when trying
to recover them using a recovery application.
- The Action Log currently holds a maximum of 100 entries, older
entries are forgotten. The actual size can be lowered in
configuration in case you want to save a little memory. But
don't worry, it does not take much memory anyway, so I'd
recommend to leave at the max. Of course, if it's very large
(say you have lots of huge batch renames) you will note a slight
decrease in startup time, but I'd say it's even worth that! Your
choice.
- The Action Log works as a history where you can go back and
forward and be at a certain position between both ends. Now when
you go back (Undo - Undo - Undo - ...) and then trigger some
logged action (e.g. delete a file), then the previous future
branched is dropped in favor of the new one.
In the Action Log Dialog the green highlighted item is the
current item in action history. It's the action that will be
undone when you click Undo. Usually it will be the top item, but
it moves downwards when you undo actions. When the complete
action history is undone you are in "Prehistory". Take care.
- The Action Log is portable (it's just a file "actions.dat"), but
of course the use of porting it to another system is questionable.
The Limits of Undo
~~~~~~~~~~~~~~~~~~
"A man can undo what a man can undo."
Just keep in mind that XYplorer's Undo is not a forensic recovery
tool for lost data. Not a single byte that was overwritten or
permanently deleted will be brought back to life by Undo.
!!! Undo only knows item names and locations, not item data.
Also keep in mind:
!!! Redo is not the Undo of Undo, but will redo the
original action!
Here are some examples that should be obvious now:
- Create a New File; Undo will delete it; Redo will create a file
of that name again. If you put any contents to that file then
they will not magically come back when you Redo the creation of
the file. Same with New Folder.
- Delete a file for good (no recycle bin): Cannot be undone.
- Move/Copy a file and overwrite same named items in the target
folder: The overwritten data are lost and no Undo will bring
them back.
- XYplorer disallows that any data are overwritten by an Undo or
Redo operation. So e.g. if you try to undo a move, but in the
meantime a file of the same name as the originally moved file
came to existence, the Undo will not happen.
In case of undoing a delete to recycler the shell will pop an
overwrite prompt.
- If you undo the creation of a folder, any contents the folder
might have gathered in the meantime will be lost and don't
come back by redoing the creation.
There's a config option to have undo/redo delete to the recycle
bin. This might save your neck in case of an erroneous undo.
- If you undo a Copy and then Redo it, the copy will be made from
today's state of the original source and thus will differ from
the original copy if the source has changed in the meantime.
Further Remarks
~~~~~~~~~~~~~~~
The hardest part of Undo/Redo was getting the refresh of Tree and
List correct, fast, and smooth. There are quite many possibilities
which all need their specific best handling. When you test this
version have an extra eye on this.
The Undo/Redo icons
~~~~~~~~~~~~~~~~~~~
Credits and thanks go to http://www.visualpharm.com/
* Configuration: Added page "Undo & Action Log" with a couple of
related options:
- Log actions and enable undo/redo
Turn the whole thing on/off.
- Remember the logged actions between sessions
If checked then the file action.dat is written on exit and read
on startup. Note that it is even written when "Save settings on
exit" is off because it must stay in synch with reality as much
as possible.
- Allowed number of entries in the action log (maximum is 100)
The more entries you log the larger is action.dat, the more
memory is used, the slower is startup. But don't worry: It's
virtually not notable.
- Date format in action labels
Some options for date display. I personally like to see today's
dates as age (how long ago), and older dates as absolute
datestamp, so I added that option.
- Prompt before undo/redo
Pops a short description of what will happen when you click OK.
Note: With cumulative undo you get only one prompt, but you get
it always (independent of this setting) because cumulative undo
can be a pretty terrifying experience...
There are three levels of safety:
* Always
The safest.
* If action is older than 10 minutes
You'll lose at most 10 minutes of work without being warned.
* Never
You are tough.
- Delete to recycle bin
When undoing a Copy or a New operation, items will be deleted.
If this option is checked they will be moved to the recycle bin
instead of being permanently deleted. This is a safety net in
case you pressed Undo without thinking. The price is that you
don't get back the disk space.
Note that redoing such an operation will not get the items back
from the recycle bin but create them anew!
- Show last actions in toolbar button menu
If checked then (after a restart) the Undo/Redo buttons have a
small arrow that pops the previous/next actions (relative to the
current position in the action log) in a menu.
The dropdown has further options:
* Allow only sequential undo/redo
The safe way. You can see your action history in the menu but
you are not allowed to trigger any non-sequential operations.
An easy protection from potential disaster.
* Allow non-sequential undo/redo
If selected then the toolbar menu allows for non-sequential
undo/redo.
When you trigger a non-sequential operation (one that is not
next to the current position in the action log) from this menu
the current position in the action log will NOT change. This
makes it easier to do non-sequential undo/redo operations.
If checked then inverse operations are tolerated, i.e. you can
trigger a Redo by clicking the Undo button and vice versa! This
is a necessary consequence of the ability to do non-sequential
undo. So Undo/Redo are then Back/Forward in action log.
Repeated warning: Non-sequential undo can mess up the action log
(and hence the possibility of further undo) if you are not
careful enough. It's safer to do it from the Action Log Window
than via the toolbar menu because the former has more
information for you.
* Allow cumulative undo/redo
If selected then undoing a non-next action will not trigger (non-
sequential) undo of this action alone but trigger undo for all
actions from here to the selected one.
As this can mean a tremendous (and devastating) operation by a
single click, you'll get a safety prompt before it happens.
- Show options in menu
If checked then the above settings are also available in the
Undo button's context menu. Gives you an idea about what will
happen when you click a menu item.
------------------------------------------------------------------
+ Toolbar: Added button "Rename". Shows Rename Special as context
menu.
+ SC getinfo got a new named argument "specialfolder".
Syntax: getinfo("specialfolder", [CSIDL])
[CSIDL]: Numerical constant predefined by the OS
Defaults to 0 (= Desktop folder).
Find those values in the web...
return: Full path to the special folder.
Example:
::text getinfo("specialfolder", 9); //sendto folder
+ Added new native variable <get ...> which corresponds to the
scripting function getinfo().
Syntax:
<get info [param1]>
Example:
::text "<get specialfolder 9>"; //sendto folder
+ Tweak to allow the Shell to take care of folder thumbnails. In XP
you will get up to 4 images per folder thumbnail.
[Thumbs]
FolderThumbsShell=1
* Menu Tools: Reorganized the Tree and List customization menus.
Renamed "Tree Style" to "Customize Tree", and "List Style" to
"Customize List", and moved "Size Column Format" and "Date Column
Format" into "Customize List".