473,408 Members | 2,813 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,408 software developers and data experts.

File.Move not working as expected

Hello,

I was hoping someone might be able to shed some light on this bizarre
behaviour.

I have observed some strange behaviour with System.IO.FIle.Move where it
seems to be copying a file as opposed to actually moving it. The following is
a description of my setup:

Two separate machines (A and B) both running Windows Server 2003. Machines
reside on the same domain.

An application is running on machine A and it is responsible for managing
files on machine B. In particular it will (among other things) be moving a
file from one share (share1) on machine B to another share (share2) on
machine B.

Using an example, we have a file called bla.bla that is currently sitting in
location share1. The call in the application on machine A will attempt to
move bla.bla to location share2. e.g.

File.Move(share1/bla.bla, share2/bla.bla)

This call blocks until the operation is complete however upon return rather
then seeing that bla.bla has been moved, we actually see it now exists in
both locations (share1 *AND* share2). It SHOULD only now reside in share2.

The files in question can range in size from aprox. 10MB to say 300MB

Can anyone explain this wierdness? As far as I know, it should not be
happening.

Best regards,

Danny
Nov 16 '05 #1
1 3808
Maybe it is a Windows Bug. I observed such a behaviour with my box when I
tried to move files between USB-stick and HD.
Try to move the files manually and see wheather it is the fault of windows
or of your app.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Danny" <Da***@discussions.microsoft.com> schrieb im Newsbeitrag
news:01**********************************@microsof t.com...
Hello,

I was hoping someone might be able to shed some light on this bizarre
behaviour.

I have observed some strange behaviour with System.IO.FIle.Move where it
seems to be copying a file as opposed to actually moving it. The following is a description of my setup:

Two separate machines (A and B) both running Windows Server 2003. Machines
reside on the same domain.

An application is running on machine A and it is responsible for managing
files on machine B. In particular it will (among other things) be moving a
file from one share (share1) on machine B to another share (share2) on
machine B.

Using an example, we have a file called bla.bla that is currently sitting in location share1. The call in the application on machine A will attempt to
move bla.bla to location share2. e.g.

File.Move(share1/bla.bla, share2/bla.bla)

This call blocks until the operation is complete however upon return rather then seeing that bla.bla has been moved, we actually see it now exists in
both locations (share1 *AND* share2). It SHOULD only now reside in share2.

The files in question can range in size from aprox. 10MB to say 300MB

Can anyone explain this wierdness? As far as I know, it should not be
happening.

Best regards,

Danny

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: alanrn | last post by:
Is it possible for OCA files to become corrupt? If so, how and what can one do to "repair" them? Or, perhaps, there are other nefarious forces at work here? :-( Here are the particulars of my...
9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
1
by: Danny | last post by:
Hello, I was hoping someone might be able to shed some light on this bizarre behaviour. I have observed some strange behaviour with System.IO.FIle.Move where it seems to be copying a file as...
31
by: Arvind Varma Kalidindi | last post by:
Hi, I was asked this question in an interview recently. "How do you move to the 6th byte in a file?" ... My thinking would be to find the data types in the file, set a base pointer and advance it...
2
by: Matthew Morvant | last post by:
I have am working with a text file and wish to move the file when I am done working with it. I have the following defined: InputFolder: "D:\dhc_work\indexed\" OutputFolder:...
1
by: Chris | last post by:
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...
6
by: lilcech | last post by:
How can i cobine my image with a html file so i only have one file. The image is used inside the html file so if i delete it or move it, then it wont show up in the html file. :)
12
by: mantrid | last post by:
Hello Can anyone point me in the right direction for the way to read a text file a line at a time and separate the fields on that line and use them as data in an INSERT to add a record to a mysql...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.