Click here to Skip to main content
15,885,435 members

1 solution

Make the field bigger.
The individual parts of a filename (i.e. each subdirectory along the path, and the final filename) are limited to 255 characters, and the total path length is limited to approximately 32,000 characters in NTFS - but you should keep the total length below 260 characters if your can aas older systems only allocate that much.

50 bytes is clearly not going to be enough.

And in future, if you want help, copy and paste your information, don't post links to snapshots - it shows you are lazy and don't care to help us to help you. Some people will not follow links to images at all, so you restrict the number of useful replies you may get.
 
Share this answer
 
Comments
agent_kruger 1-Mar-14 7:10am    
sorry sir, next time i will only paste the written matter.
OriginalGriff 1-Mar-14 7:28am    
:thumbsup:
OriginalGriff 1-Mar-14 7:33am    
Difficult: in theory, you *should* be ok with 260 bytes, as that is the "MAX_PATH" value that windows works with.
But...Do you trust that?
OK, I'm running Win7, and it won't let me create a folder path/filename combo longer than 260 characters, but it's a risk relying on it! (Remember, we have no control over Win9, or 10, or ...)
I'd probably go with 1024, or MAX just to be on the safe side, depending on how many items you expect to store. If it's a lot, then 1024, if it's a few, then MAX.
But 50? Nowhere near! :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900