| Summary: | Scripting plugin does not work at all in Windows as no environmental variables populated with filenames | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | james anderson <james18> |
| Component: | Plugin-Bqm-Script | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 8.8.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://invent.kde.org/documentation/digikam-doc/-/commit/4c7d9264b24454590352ea6a15be43eaa1855894 | Version Fixed/Implemented In: | 9.0.0 |
| Sentry Crash Report: | |||
|
Description
james anderson
2025-12-26 00:15:46 UTC
The BQM script works perfectly fine in Windows as well. The variables $NPUT and $OUTPUT are not stored as environment variables; we can do that if you need them. These variables are directly replaced in the script with the corresponding file paths, using escaped code. Please post a script example that is not working. Maik James, Take a look at the online doc here : https://docs.digikam.org/en/batch_queue/custom_script.html When you have an example of Windows script working properly on your computer, we can add it as example to the doc. Best regards Gilles Caulier (In reply to Maik Qualmann from comment #1) > The BQM script works perfectly fine in Windows as well. > > The variables $NPUT and $OUTPUT are not stored as environment variables; we > can do that if you need them. These variables are directly replaced in the > script with the corresponding file paths, using escaped code. > > Please post a script example that is not working. > > Maik Maik thanks for the super rapid response! I've re-read the documentation and now understand the issue. I was misled by the Notes section of this part of the manual which says this: "Under Windows, environment variables can be accessed in the script with % as a prefix and suffix of variable names (for example %INPUT%). The interpreter used to run the script is cmd.exe." So I just thought that everything would just show up in the environmental variables because that would be a consistent approach and a logical way of doing this, and you're using %INPUT% as an example. If you can populate the variable as well, I'm sure you won't end up with people like me making the same mistake, (and clearly other people are doing the same according to my searches. ) Now that I understand you're doing the substitution in the script I can test that. I'm sure it will work! James James, When you have a sample script for Windows to provide as example in the documentation, Please share. Best regards Gilles Caulier (In reply to caulier.gilles from comment #4) > James, > > When you have a sample script for Windows to provide as example in the > documentation, Please share. > > Best regards > > Gilles Caulier Hi Gilles, This is effectively your sample bash script translated for Windows: :: Windows shell example set infile=$INPUT set outfile=$OUTPUT echo INPUT FILE: %infile% >>c:\temp\digikam.txt echo OUTPUT FILE: %outfile% >>c:\temp\digikam.txt echo TITLE: %TITLE% >>c:\temp\digikam.txt echo COMMENT: %COMMENT% >>c:\temp\digikam.txt echo COLORLABEL: %COLORLABEL% >>c:\temp\digikam.txt echo PICKLABEL: %PICKLABEL% >>c:\temp\digikam.txt echo RATING: %RATING% >>c:\temp\digikam.txt echo TAGSPATH: %TAGSPATH% >>c:\temp\digikam.txt copy %infile% %outfile% It would be excellent if Digikam did put the input and output files into environmental variables for DOS alongside all the other values but the implementation is working as designed. Reason for doing this is then it would be consistent with the approach you are taking with all the other values. thanks! Git commit 4c7d9264b24454590352ea6a15be43eaa1855894 by Gilles Caulier. Committed on 27/12/2025 at 08:14. Pushed by cgilles into branch 'master'. add the Windows Shell version of the script in the online documentation. FIXED-IN:9.0.0 M +20 -1 batch_queue/custom_script.rst https://invent.kde.org/documentation/digikam-doc/-/commit/4c7d9264b24454590352ea6a15be43eaa1855894 |