wallway
asked on
Testing delete of directory before actual delete
I need to delete an entire directory but I only want to start the deleting process if all the contents can be deleted. If they can't I don't want to delete anything. Is there a way to do this?
AFAIK no. If you're worried about the 'transaction' you could always take copies of successfully deleted files so they can be restored if the transaction fails.
Only way would be to copy the entire directory before attempting delete.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.