Renaming files with full path names

Advanced Renamer forum
#1 : 20/06-16 00:46
Allen Lang
Allen Lang
Posts: 2
Hi. I would like to rename all my photos so that the filename includes the full path of where the photos are on my computer hard drive. So for example, MSC1234.jpg would become C:\Photos\2015\John_Wedding\MSC1234.jpg. Is it possible to do this? I can see how one can include the directory name, but not the full path name.
This way, if I copy all my photos onto a USB flashstick on my digital photo frame, I'll be able to identify where the photo originated should I need to.

Thanks,
Allen


20/06-16 00:46
#2 : 21/06-16 04:05
Jeb Smith
Jeb Smith
Posts: 2
Reply to #1:

The basics
<ExifTool:Directory><ExifTool:FileName>

There is a setting (Program > Settings > Renaming ) to autoreplace invalid filename characters so by default the "\" will be replaced by "_".

Technically the answer is no, filenames can't have reserved directory separators ( ie slashes) because the OS would interpret that as a folder path internally, therefore its invalid and impossible. But that doesn't mean you can't craft a pseudo path representation filename to get the job done.


21/06-16 04:05 - edited 21/06-16 04:39
#3 : 23/06-16 18:26
Allen Lang
Allen Lang
Posts: 2
Reply to #2:
Thanks for your reply. I managed to get a solution Shortly after posting the query, and, while it isn't exactly what I wanted, it is easier enough. For any other people with a similar requirement, waht I did was rename as: <DirName:4>_<DirName:3>_<DirName:2>_<DirName:1>_<Name>
where each <DirName:n> is one level higher than the previous one. So you can choose how many path steps you want.


23/06-16 18:26