Discussion:
ShellFileCopy API - Windows sometimes returns “File is too large for destination file system” error
(too old to reply)
techman41973
2011-12-06 20:25:39 UTC
Permalink
I have a program I wrote in Visual Basic that copies a file from one
directory into another directory at a prescribed interval. The Visual
Basic programs uses the ShellFileCopy API function
http://www.ex-designz.net/apidetail.asp?api_id=357
http://www.freevbcode.com/ShowCode.asp?ID=499

99% of the time, the program works fine.
However occasionally, I get a Windows error that pop's up that says
"File is too large for the destination file system"
This is extremely baffling as the size of the file that is being
copied is under 1MB.

Does anyone have any idea to what would be triggering this error in
Windows 7?
Thanks
Mayayana
2011-12-06 22:06:25 UTC
Permalink
I'm curious why you're using the Shell wrapper if you
don't need GUI. Why not just use kernel32's CopyFileA?

Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal
lpExistingFileName As String, ByVal lpNewFileName As String, ByVal
bFailIfExists As Long) As Long
--
--
"techman41973" <***@yahoo.com> wrote in message news:1f8479de-ae1b-44c7-8f49-***@4g2000yqu.googlegroups.com...
|I have a program I wrote in Visual Basic that copies a file from one
| directory into another directory at a prescribed interval. The Visual
| Basic programs uses the ShellFileCopy API function
| http://www.ex-designz.net/apidetail.asp?api_id=357
| http://www.freevbcode.com/ShowCode.asp?ID=499
|
| 99% of the time, the program works fine.
| However occasionally, I get a Windows error that pop's up that says
| "File is too large for the destination file system"
| This is extremely baffling as the size of the file that is being
| copied is under 1MB.
|
| Does anyone have any idea to what would be triggering this error in
| Windows 7?
| Thanks
Nobody
2011-12-06 22:07:03 UTC
Permalink
Post by techman41973
I have a program I wrote in Visual Basic that copies a file from one
directory into another directory at a prescribed interval. The Visual
Basic programs uses the ShellFileCopy API function
http://www.ex-designz.net/apidetail.asp?api_id=357
http://www.freevbcode.com/ShowCode.asp?ID=499
99% of the time, the program works fine.
However occasionally, I get a Windows error that pop's up that says
"File is too large for the destination file system"
This is extremely baffling as the size of the file that is being
copied is under 1MB.
Does anyone have any idea to what would be triggering this error in
Windows 7?
Not enough information. For example, how much free space on the destination
drive? How many characters in the path? Perhaps they exceed MAX_PATH, which
is 260.
ralph
2011-12-06 23:11:51 UTC
Permalink
Post by Nobody
Post by techman41973
I have a program I wrote in Visual Basic that copies a file from one
directory into another directory at a prescribed interval. The Visual
Basic programs uses the ShellFileCopy API function
http://www.ex-designz.net/apidetail.asp?api_id=357
http://www.freevbcode.com/ShowCode.asp?ID=499
99% of the time, the program works fine.
However occasionally, I get a Windows error that pop's up that says
"File is too large for the destination file system"
This is extremely baffling as the size of the file that is being
copied is under 1MB.
Does anyone have any idea to what would be triggering this error in
Windows 7?
Not enough information. For example, how much free space on the destination
drive? How many characters in the path? Perhaps they exceed MAX_PATH, which
is 260.
Also other activity.

If the file is in fact less than 4g then the error is likely a
red-herring - something else is in play. Permissions? FAT32
peculiarities? Sharing/Locks? ...

Intermittent problems are often the result of an untimely placed card
upon a house of cards. <g>

-ralph

Loading...