473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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
1 3840
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Vilmar Brazão de Oliveira | last post by:
HI; How can I rename a file with aspupload or FSO before upload? I looked for in documentation of these products, but I could not find anything yet! Thanks, -- ««««««««»»»»»»»»»»»»»»
5
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up...
3
by: Don Pasquale | last post by:
The following function intends to delete "numberoflines" lines from a text file, named "s" (string pointer) and pointed to by file pointer "fp", starting from line "line". Now, the function...
2
by: Chris Calhoun | last post by:
If I copy or move a file and the file already exisits how do I overwrite the old file or rename the new one ? Thanks in Advance.
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
3
by: News | last post by:
Is it possible to delete a file by copying it to the "bit bucket" or "null device"? Back in my youth when I live in VMS-land you could delete a file by copying it to NL: ========== I have...
3
by: Arpan | last post by:
A Form has a FileUpload, 2 Buttons & a TextBox web server controls. Using the FileUpload control, I want to give users the provision to move & delete files that DO NOT exist in C:\Inetpub\wwwroot...
12
by: Darrel | last post by:
I'm still having a hell of a time figuring out this whole SQL Express set up. I finally discovered why I couldn't run the aspnet_regsql...my local sql server wasn't running. I turned that on,...
4
by: gerardianlewis | last post by:
Any help appreciated. (VB.NET under XP and Vista, SP1 installed) My code, inherited from a VB6 version of an app that ran under W98, loads an image from a file into a PictureBox. The user may...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.