Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: seeking fix for “File is too large for destination file system” erro

06 Dec 2011   #1
techman41973

Windows 7
 
 
seeking fix for “File is too large for destination file system” erro

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
ShellFileCopy Visual Basic 6 API Function
FreeVBCode code snippet: Copy Files Using the Shell API


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


My System SpecsSystem Spec
.

06 Dec 2011   #2
MilesAhead

Windows 7 32 bit
 
 

Why are you using ShellFileCopy()? I'm asking because I used it in some programs but it was a long time ago. For your purpose can't you just use FileCopy()?

If I remember, I used Shell copy because it provided a progress dialog. If the files are that small that won't come into play. Or is the small file just because you are testing?

Edit:

Ok, I think I may see the problem. The wrapper function uses Strings as source and destination. If you read the MSDN entry for SHFILEOPSTRUCT the source and destination strings must have a double null terminator. If not, the function will just keep reading memory getting the source or destination name until it finds a double zero.

You need to make a string compatible with LPCTSTR type that has a double zero a the end.
My System SpecsSystem Spec
06 Dec 2011   #3
techman41973

Windows 7
 
 

Miles, from what I recall, I had issues with Filecopy that I couldn't resolve.
I just changed my code to use Filecopy again and for now it seems to be working, so I may stick with it.

Regarding your second bit of advice on using ShellFilecopy,

"You need to make a string compatible with LPCTSTR type that has a double zero a the end."

If this is truly the problem, why am I getting this error only occasionally?
And how would a string mismatch trigger a "file to large" error

Thanks again
My System SpecsSystem Spec
.


06 Dec 2011   #4
antmcg

Windows 7 Professional x86
 
 

My initial reaction to seeing your first post was you must be using FAT32 instead of NTFS, but then of course reading further saw the file size you were talking about, so that doesn't become a factor... I realise this doesn't help you, but may some one else having a “File is too large for destination file system” error
My System SpecsSystem Spec
06 Dec 2011   #5
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by techman41973 View Post
Miles, from what I recall, I had issues with Filecopy that I couldn't resolve.
I just changed my code to use Filecopy again and for now it seems to be working, so I may stick with it.

Regarding your second bit of advice on using ShellFilecopy,

"You need to make a string compatible with LPCTSTR type that has a double zero a the end."

If this is truly the problem, why am I getting this error only occasionally?
And how would a string mismatch trigger a "file to large" error

Thanks again
The error may really mean the file path is too long. You are calling the ANSI version of the function. Meaning max path is like 260 characters. The erratic behavior is right in line with this type of error. If there happens to be a double zero in memory after the file path before it exceeds 260 characters you may not get the error. Have you checked the output file names for funky characters hanging on the end?

I haven't done that much VB but there must be a method to fill a buffer with zeroes. Then copy a string into it and use the address so that it's guaranteed to have at least 2 zeroes at the end of the string.

When there's a warning like that on the API docs, that's almost always the problem. I don't think VB strings by default have 2 zeroes at the end.
My System SpecsSystem Spec
06 Dec 2011   #6
MilesAhead

Windows 7 32 bit
 
 

SHFILEOPSTRUCT structure

See the entries for pFrom and pTo
My System SpecsSystem Spec
Reply

 seeking fix for “File is too large for destination file system” erro




Thread Tools





Similar help and support threads
Thread Forum
Seeking FLV File Editor
I'm looking for an editor that will allow me to eliminate (delete) portions of a somewhat large (~3 GB FLV) video file. One that will maintain the existing 16:9 aspect ratio (full screen). I already have the complete cadre of AVS4U software (Video Editor, Video Converter, etc.), but can't use its...
Sound & Audio
File name too long for destination folder?
Backing up an entire SSD to large HDD using a copy command. I received the following message indicating that 50,000 files are too long. Can anyone explain this situation and what I must do different?
General Discussion
Seeking BSOD Assistance With MiniDump File Only
MiniDump zip file attached. My BSOD is happening 1-2 times a day and always once between 5 & 9 AM when the PC is unattended. EDIT 10/12/2013: I was finally able to complete the SF Diagnostic Tool scan. Zip file is in post #5 below. Please see "Test Mode Windows 7 Build 7601" questions...
BSOD Help and Support
File Name(s) Would Be Too Long for the Destination Folder
Sorry if this is a repeat post but I’ve found so much about this issue that I’m bewildered & haven’t found a Fix. I’m 65 & legally blind so searching the net isn’t as easy as it used to be. I have one of a kind Family pics that if lost are gone forever so I back them up on 2 ext HD’s in case 1...
General Discussion
Magic ISO "ERROR: Added file is too large." when adding 4.29 GB file
When I try to add a 4.29 GB file to a disk image I'm creating it says "ERROR: Added file is too large." Registered Magic ISO is supposed to support up to 10 GBs. What's the deal?
Software
Win7 64bit Large file download slowing system (NOT bittorret)
hiya guys. I have a friend that usually comes to me regarding tech issues and I'm a bit lost on this one. He has a Windows 7 64bit OS with 4GB of ram. He has been downloading a set of 8GB files and almost like clockwork, his entire system starts chugging at about 3GB. He is NOT using a...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 00:48.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App