Change folder of file upload

Hi to all,
in the private/files/ folder I have to create some subfolders where loading my files.

Is it possible to change the folder where the file will be loaded?

I create a script, that after saving the documente, move the upload file into subfolderand then I change the String of the attach field value path.

In this way, when I try to open te file clicking on the attach field, The system answer to me that I don’t have the permission to access the file.
I try using chmod 777 to folder and file, but the problem persist.

Anyone have some idea?
Thanks
Alessandro

Hi @alaurucci:

Folder location is hardcoded. Via custom app, using hooks for File doctype, you would change everything …

Check how this was made …

Hope this helps.