By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,077 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,077 IT Pros & Developers. It's quick & easy.

File.Move vs (File.Copy and File.Delete)

P: n/a
We had an application running on a server that had been working for
months with no problem.

Last night, without any known change to the server, it started to
fail.

We tried all kinds of permission checking... even running the app as a
domain admin, but we kept getting the UnauthorizedAccessException
error during a File.Move operation, saying that the path to the
destination file was denied.
I changed the File.Move to File.Copy followed by File.Delete, and
everything is working fine.
What is the difference between File.Move and File.Copy + File.Delete?

Does anyone out there have any idea on this issue?
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Might be nice if you elaborated on when and where the failing call is being
made. Like right after a dtabase close event or inside a class.

Snippet of code would be helpfull too. Otherwise, we'de be speculating over
the true cause.

"Chris" <cm**@walshgroup.com> wrote in message
news:44**************************@posting.google.c om...
We had an application running on a server that had been working for
months with no problem.

Last night, without any known change to the server, it started to
fail.

We tried all kinds of permission checking... even running the app as a
domain admin, but we kept getting the UnauthorizedAccessException
error during a File.Move operation, saying that the path to the
destination file was denied.
I changed the File.Move to File.Copy followed by File.Delete, and
everything is working fine.
What is the difference between File.Move and File.Copy + File.Delete?

Does anyone out there have any idea on this issue?

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.