Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

File.Copy missing 5KB at destination

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt Hamilton - 03 Mar 2006 18:00 GMT
I have a simple concole application. It queries a database, generates a
formatted file locally, then copies the file to a location on the network.
The file sizes are between 20MB and 60MB. The file generates fine and is
correctly formatted locally, but when it is copied (using a simple
File.Copy(src, dest, ow)) the destination file is always 5KB smaller. This
would be a nice feature except that there is data missing from the file. The
problem occurs regardless of file size or destination location. The only
difference is that it only occurs inside the original console application
(e.g. I tested copying with a new solution that took an existing file and
copied it and it worked). Debugging reveals nothing.
Lau Lei Cheong - 04 Mar 2006 02:55 GMT
Although it seems to be dumb question, I wish to clarify the size difference
you saw is the "actuall size" or "on disk size"?

Also, after you generates the file, did you try to "flush" the content
first? Try add Flush()(or actually a proper Close() will do)and see if it
helps.

"Matt Hamilton" <MattHamilton@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:CA31AD78-8E95-4AB4-B1D9-44086E145319@microsoft.com...
>I have a simple concole application. It queries a database, generates a
> formatted file locally, then copies the file to a location on the network.
[quoted text clipped - 7 lines]
> (e.g. I tested copying with a new solution that took an existing file and
> copied it and it worked). Debugging reveals nothing.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.