Use directory name in file name

Hi,

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

ROOT/2022/202206/202206_.jpg

For instance:
ROOT/2021/ABC202102A/abc202102a_001.jpg

ROOT/2021/ABC202102A/abc202102a_036.jpg

ROOT/2021/ABC202102B/abc202102b_001.jpg

ROOT/2021/ABC202102B/abc202102b_010.jpg

ROOT/2022/XYZ202206A/xyz202206a_001.jpg

ROOT/2022/XYZ202206A/xyz202206a_108.jpg

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?

Thanks!

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:

xyz202206b_001.jpg
xyz202206b_001.raw
xyz202206b_002.jpg
...

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.