AnsweredAssumed Answered

vrf Problem with System.IO.File.Copy

Question asked by VRFuser on Jan 21, 2008
Hi all,

Problem solved!!

It was due to my lazyness and over use of cut and paste! After checking the the write time I was closing the files (I have an obsession with not leaving files open, having been caught out many times in the past). But I was using 'To file' to close a file I had read from. I changed it to 'From File' and all seems fine. If it happens again I will post again.

I still don’t understand why this would empty the file.

Simon

-----Original Message-----
From: fukui.yutaka@jp.fujitsu.com [mailto:fukui.yutaka@jp.fujitsu.com]
Sent: 21 January 2008 08:40
To: Simon Parfitt
Subject: Re: RE: [vrf] Problem with System.IO.File.Copy

Hi,


You are welcome.

Rebooting the company server is also out of my reach.

I will be checking the size of a pasted file when copying a file over network.
 

Regards,
FUKUI Yutaka

----- Original Message -----
>Subject: RE: [vrf] Problem with System.IO.File.Copy
>Date: Mon, 21 Jan 2008 07:45:29 -0000
>From: "Simon Parfitt" <parfitt@IceraSemi.com>
>To: VRF <vrf@agilent.com>
>
>
>Thanks, but my "remote pc" is the company server.
>
>I might just read the the whole file in and resave it.
>
>
>
>-----Original Message-----
>From: fukui.yutaka@jp.fujitsu.com [mailto:fukui.yutaka@jp.fujitsu.com]
>Sent: 21 January 2008 01:07
>To: VRF
>Subject: Re: [vrf] Problem with System.IO.File.Copy
>
>Hi,
>
>
> I have a rather same problem with my system.
>
> I copy and paste files from a remote PC to a local PC
>using "Remote Desktop Connection" of Windows XP Pro.
>
> This works fine most of the time.....but sometimes it fails
>when I try to paste the file, with an error information that says
>"There exists no copy to paste!".
>
> If I remember correctly, I rebooted the remote PC(not a local PC)
>in order to solve this problem.  
>
>
>Regards,
>FUKUI Yutaka
>
>----- Original Message -----
>>Subject: [vrf] Problem with System.IO.File.Copy
>>Date: Sun, 20 Jan 2008 10:38:29 -0000
>>From: "Simon Parfitt" <parfitt@IceraSemi.com>
>>To: VRF <vrf@agilent.com>
>>
>>
>>Morning All,
>>
>>
>>
>>I have a very intermittant probem with this Dot Net call
>>
>>
>>
>>System.IO.File.Copy(sourceFileName, destFileName);
>>
>>
>>
>>I use to copy the latest templates/set up file etc from network drive to
>>the local drive on start up of our ATE system. I check the last write
>>time of the source and dest with
>>
>>
>>
>>System.IO.File.GetLastWriteTime(path).ToString();
>>
>>
>>
>>If differenet then I delete the local copy and then use
>>
>>
>>
>>System.IO.File.Copy(sourceFileName, destFileName);
>>
>>
>>
>>To copy the latest version to the local drive.
>>
>>
>>
>>This works fine most of the time.....but sometimes maybe once a week the
>>local copy and network copy have been emptyed. That is they are there
>>but have size zero.
>>
>>
>>
>>Lucky for me I keep copys of these files. I cannot work out why this
>>would happen. Has anyone seem this before?
>>
>>
>>
>>
>>
>>Simon
>>
>>
>>
>>
>>
>>
>>--
>>****************************************************************************
*
>*************
>>This e-mail (including any attachments) is intended only for the recipient(s
)
>>named above. It may contain confidential or privileged information and shoul
d
>>not be read, copied or otherwise used by any other person. If you are not a
>>named recipient, please contact the sender by telephone (+44-1454-284800)
>>and destroy the original message.
>>Any statement and/or opinion not related to this company's business and
>>expressed in this message is that of the author and does not necessarily
>>reflect those of Icera. This company does not take any responsibility
>>for the views of the author in any matter not related to the
>>company's objective.
>>****************************************************************************
*
>*************
>>
>>---
>>You are currently subscribed to vrf as: fukui.yutaka@jp.fujitsu.com
>>To subscribe please send an email to: "vrf-request@lists.it.agilent.com" wit
h
> the word subscribe in the message body.
>>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
>>To send messages to this mailing list,  email "vrf@agilent.com". 
>>If you need help with the mailing list send a message to
>>"owner-vrf@it.lists.it.agilent.com".
>>Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archiv
e
>".
>>Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
>
>== ? =====================================================================
> FUJITSU ???(?)????[?9-432] ?????????
>  ?????????)??·?????????? ? ??  ? (FUKUI Yutaka)
>INTERNET E-Mail: fukui.yutaka@jp.fujitsu.com
>TEL: 044-754-2238(ext:711-5-3153)     FAX: 044-754-2434(ext:711-5-3178)
>== ? =====================================================================
>
>
>
>---
>You are currently subscribed to vrf as: parfitt@icerasemi.com
>To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with
the word subscribe in the message body.
>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
>To send messages to this mailing list,  email "vrf@agilent.com". 
>If you need help with the mailing list send a message to
>"owner-vrf@it.lists.it.agilent.com".
>Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive
".
>Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
>
>
>--
>*****************************************************************************
*************
>This e-mail (including any attachments) is intended only for the recipient(s)
>named above. It may contain confidential or privileged information and should
>not be read, copied or otherwise used by any other person. If you are not a
>named recipient, please contact the sender by telephone (+44-1454-284800)
>and destroy the original message.
>Any statement and/or opinion not related to this company's business and
>expressed in this message is that of the author and does not necessarily
>reflect those of Icera. This company does not take any responsibility
>for the views of the author in any matter not related to the
>company's objective.
>*****************************************************************************
*************
>
>
>---
>You are currently subscribed to vrf as: fukui.yutaka@jp.fujitsu.com
>To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with
the word subscribe in the message body.
>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
>To send messages to this mailing list,  email "vrf@agilent.com". 
>If you need help with the mailing list send a message to
>"owner-vrf@it.lists.it.agilent.com".
>Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive
".
>Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
>

== ? =====================================================================
FUJITSU ???(?)????[?9-432] ?????????
  ?????????)??·?????????? ? ??  ? (FUKUI Yutaka)
INTERNET E-Mail: fukui.yutaka@jp.fujitsu.com
TEL: 044-754-2238(ext:711-5-3153)     FAX: 044-754-2434(ext:711-5-3178)
== ? =====================================================================


--
******************************************************************************************
This e-mail (including any attachments) is intended only for the recipient(s)
named above. It may contain confidential or privileged information and should
not be read, copied or otherwise used by any other person. If you are not a
named recipient, please contact the sender by telephone (+44-1454-284800)
and destroy the original message.
Any statement and/or opinion not related to this company's business and
expressed in this message is that of the author and does not necessarily
reflect those of Icera. This company does not take any responsibility
for the views of the author in any matter not related to the
company's objective.
******************************************************************************************


---
You are currently subscribed to vrf as: ming_meng@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".

Outcomes