Link to home
Start Free TrialLog in
Avatar of wallway
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?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial