The issue is probably not the size of the file, but the path\name total size (as the error is telling you).
Eg if you are running locally, it could be that you default Mendix folder is stored in your 'Documents' section. This folder will already contain a long path c:\users\<domainuser>\<synchfolder>\etc.. If you also have a long app name, this will be more that the 260 characters.
Solution would be to have a short app name and make sure to create a local structure like c:\apps\Mendix as your root for your apps.
Furthermore, it is not advised to store Mendix apps on a synchronized folder as it will decrease the performance (and can cause errors).