Jump to content

Recommended Posts

Posted

Hi, I'm having a problem with FileCopy. I have a very simple function that copies a text file to a remote share. The file seems to copy fine, but it's not copying the entire file. I was copying the file to a UNC path at first, but since that was not working I tried mapping the drive first and then copying the file. but still I receive the same result. I then used xcopy instead of the built in filecopy function, but again the same problem. If I drag and drop the file to the share it copies just fine. Do you guys have any thoughts why these copy methods are not copying the entire file?

The text file is 12.9 KB (13,271 bytes)

After copy is is 12.0 KB (12,288 bytes)

Any thoughts?

Posted

Is the net share in NTFS compressed format ?

Have you tried copying the file to another local folder ? And then check the size ?

Rgds.

[s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________---------------

Posted

The original file probably has an Alternate Data Stream. The drag and drop method in windows will copy the data stream along with the file, as long as the target file system supports it. AutoIt's FileCopy() and XCOPY do not copy the ADS along with the file.

Posted

My bad guys. I iterate through a recordset writing the results to a file. After reaching EOF I then copy the file to a remote share. I wasn't closing the handle of the file and that was causing my issue. I don't understand why it copied anything at all then, but the issue is resolved. Thanks for the help though.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...