Directory.Move

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Someone knows what happens in detail if Directory.Moves (.NET C# 2.0) throws
an exception?
Background:
I'm stepping through all subdirectories within some directory (e.g. c:\test)
and moveing all those directories to another location.
If moveing ONE subdirectory fails I'm trying to move back all previous
correctly
moved directories ... so far so good ...
But what happen with the last directory which movement caused the exception.
Does this directory keeps its "original" state, or are just some files
moved, ...

Thanks in advance for an answer
and regards,
Martin
 
Hi Martin,

I know this doesn't directly answer your question, but why not just copy the directories and then delete the source if they all copy
successfully?
 
Hi Dave,

yes, that was the alternative, but what I wanted to figure out (additionally),
is that several detail information is missing within the documentation.
In my opionen developers need a lot of more infos.

If there will be no answers according to my question I have to
change implementation to your suggestion.

Thanks and best regards,
Martin
 
Back
Top