Use directory name in file name


I am considering using RPD to replace home-grown download scripts. I have the following file structure and naming convention:


For instance:






So basically the file names are prefixed with the directory name, in lowercase.

This is feasible with custom rules for both directories and files, but I have to repeat the rules for the directory and the file names, once uppercase, once lowercase. Is there any way to refer to the directory name (lowercase) in the template of the file name?


Did you consult the documentation?

In any case the answer is not unless you use Job Codes, but then you miss out on the capitalization differences.

Yes, I read the documentation before posting. I saw the job codes, but they seem to be some kind of labels that need to be created manually, so I don’t see how it helps in my case. I need a new sub-directory for every import, and the file names to be prefixed with the name of the directory. This convention comes from the time I had films that I scanned and imported on my computer.

As a matter of fact, I actually also need to create the directories dynamically. If I do an import now, it will be in a directory called “XYZ202206A”. XYZ is a code for the source, I could use a job code for that. 202206 is the month. “A” is an index. So the second import from the same source in the same month would create a new directory called “XYZ202206B”, “XYZ202206C”. If I import from another source, then the new directory would be for instance called “YAC202206A”.

The files within those directories must be named after the directory:


I realize this is a pretty specific convention, but I would prefer not to change it, because it would be quite some work and risk to adapt the current files, and in addition all external references (exports, print-outs…) would become inconsistent.

My feeling is that this is too specific for RPD, and I will have to stick to my home-grown scripts, but I would be glad to be proven wrong :slight_smile:

If there is something in the documentation that is unclear then please let me know. It should be easy from a combination of the docs and using the program to see if it will work for you or not.