How can I limit the size of a folder on a USB drive? For example, if I set 5 MB for the folder size, I could not copy more than 5 MB of data to this folder.
It is not possible to do this in every folder with functionality built into the operating system. You can do this (assuming the device is formatted in NTFS) with disk quotas at the level of the entire disk / partition
Some additional information about disk quotas:
The only way you could do this would be to write some form of File File Filter , but that is not what is currently achievable in managed code.