I'm working on a feature that will allow me to create series of nodes. Each node will have a number of associated files. I'd like to be able to upload the files to a directory that uses some fields from the parent node. In other words, when the file is uploaded, a directory is used (or created if it doesn't exist yet) that uses the date the node was created and the title of the node. I know I can specify a static directory to use when creating a file field, but I need create a subdirectory inside the parent directory. Is this possible?
You can set the upload directory on the field settings for file fields.
By default the available tokens that can be used to create the directory are not that useful, because you can't use tokens for the node you just saved, for example.
To do that you can use the http://drupal.org/project/filefield_paths module.
It will allow you a much wider range of tokens. It also allows you to use tokens in the file name, as well as the directory.
If you look under your filefield settings you will see a field that called, “File directory” that is self-described as:
Optional subdirectory within the upload destination where files will be stored. Do not include preceding or trailing slashes. This field supports tokens.
You can use tokens. Something like.