All File Deletion is a Disputed Transaction in Windows Explorer but an Iterative Delete in Dos Prompt
I normally have the habit of cleaning up the temp folder in my Windows on a regular basis so that it does not unnecessarily eat away the hard disk space. However, I observed two distinct behavior between Windows Explorer and MSDOS prompt of the temp folder.
- To avail the friendly GUI services, we normally resort to CTRL+A and DELETE.
- Attempts to delete the folder and files one by one. But even when one file could not be removed due to permission restriction or 'The process can not access the file because it is being used by another process' error, it just aborts without visiting remaining files in the folder.
- Moves the folder to Recycle Bin
- A generic progress bar of the progress of deletion is indicated by a GUI popup.
- Recurses into folders and repeates (2) through (4).
- Command Used: del . and press y when prompted.
- Attempts to delete the folder and files one by one. But when a particular file could not be deleted, it emits an appropriate error message along with the erring file but resumes with the next file.
- Does not move the file to Recycle Bin but permanently purges it.
- At least the command used in (1) does not recurse through the folders.
Windows, at least a quick layman's view seems to be nurturing an incomplete transaction implementation. If one debates that the file deletion should be aborted like in a transaction, then the files/folders that were deleted should also be rolled back and restored to the current state right?