I guess this would be some scripting thing. The underlying issue is, that time stamps of folders are getting messed up, when the folders are copied at some later time to a different machine, sometimes leaving those folders non-chonological.
In that case i have to go to the metadata panel and change them all by hand, which isn't so convenient when having lots of folders to process.
My dates are created in the dd-MMM-yy format in german language (if this matters to the script), so the task would be to fetch that date string and somehow change the folder's created date to this value. As far as i can guess, there is no other way to get the original dates, except from the folder's names, once the time stamp has been changed through copying at some later time.
Hmm, that looks promising, lxp. But what is supposed to happen exactly? The created time stamp of the folder stays the same. Or did i miss something? Also, not sure which logs.
Lxp, i found the log now, it was the other one. Looks promising, except i would like to change the created date instead of modified. Is it ok to change
Yep, uncommenting did the trick. Very cool. I can even batch process the folders with your script. If you do this while on your job, i hope your boss doesn't know about it.
I guess you can only test it, if you have your folders name in the dd-MMM-yy format AND in the german spelling, which might not be the case, without making some changes to the script.
Just checked your profile, so you can use it, if you're using the german time format like 16-Aug-23.
Suppose, your time stamp is 17-Aug-23, you can use the script, after having placed the script in the Script Addins folder and have uncommented that line (// cmd.RunCommans(cmdLine)). If you then run the SetTimestampsFromFilenameGerman command from the command line or from a button, your created time stamp will be set accordingly to your folder's name.
@abr , thank you for replying. I am so interested in that script, because I recently wrote a "function" (outside of DOpus) transforming various strings into "YYYY-MM-DD" (ISO-format? with RegEx) and will soon be wanting a script within DOpus to transfer
file-names to metadata Title
year to metadata Year
I would really like to learn how to create a script in DOpus. In fact, I would like to also learn how to begin writing a script.
I have what one might call a "Subway Knowledge" of things, like when I moved to Berlin, I knew how to get from A to B, got to know the sourroundings of A and B, and there somewhere was a C. I could reach all these points by subway, but I could not navigate the streets.
I know some HTML, CSS, JavaScript, Regex, and SQL but I struggle to link them together.
Nothing spectacular, just the basic steps. Know how to run a script command, know where to find the logs and how to read them, know how to check if the script will do what you expect it to do, know how to unlock a script (because in its original state, it shoots only blanks for safety).
Let me try to clarify "the basic steps" (having done some reading)
I write a script (VSCode) and save it with a ".js" extension
I save this script to
a) %appdata%\GPSoftware\Directory Opus\Script AddIns
b) %appdata%\Roaming\GPSoftware\Directory Opus\Scripts
Question: Is it a) or b) or either? What is the difference?
Know how to run a script command: link it to a button, menu item
About your script @lxp, what I (later, much later) will try to extract from it is the way you assign values to meta data. (Need to write file-name and year to their respective metadata-fields)
@WKen Your little script will be the seed for all the others. It is straightforward enough to comprehend easily and tinker around with.
@abr your pointing me to "copymeta-copy-metadata-between-files" by @lxp will provide me with the necessary vocabulary
So at last, I will get to know more streets and more connections.
Thank you all very much
And here's my favourite quote by Antoine de Saint-Exupéry