Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / September 2005



Tip: Looking for answers? Try searching our database.

FileSystemObject - Method '~' of object '~' failed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cbt - 21 Sep 2005 15:11 GMT
I'm getting having a strange problem trying to move a file from one server to
another.  Here is my code:

   strFrom = "d:\testfile.txt"
   strTo = "\\server\share\testfile.txt"
   Dim fso As New FileSystemObject
   fso.MoveFile strFrom, strTo

When I move a small file (<1 MB everything is fine).  But when I try a file
that is approximately 25 mb, I get the following error:

Run-time error '-2147023766 (8007046a)'
Method '~' of object '~' failed

I've not narrowed down at exactly what filesize it fails at, but there is
plenty of space on the remote server (>200GB)

Any help would be appreciated
Nospam - 21 Sep 2005 15:21 GMT
> I'm getting having a strange problem trying to move a file from one server to
> another.  Here is my code:
[quoted text clipped - 14 lines]
>
> Any help would be appreciated

I would get rid of fso as fast as possible. It is very slow and can be
disabled by the user.

Do you get the same problem when you use the FileCopy command?

Try the following and see what happens
   FileCopy "d:\testfile.txt", "\\server\share\testfile.txt"

This should work OK. I have used this command with 200 Mb files with no
problem. If you still have an issue I would start looking for a
Hardware/Driver problem.

John..
cbt - 21 Sep 2005 15:44 GMT
Thanks...  Since I wrote my original message I've tested using FileCopy and
Kill to delete the original file.  This seemed to work.  I appreciate your
help.

Craig

> > I'm getting having a strange problem trying to move a file from one server
> to
[quoted text clipped - 30 lines]
>
> John..
 
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



©2009 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.