Error when using the AutomatedJpeg2kCompression.lua script

Im getting the following error when using the AutomatedJpeg2kCompression.lua script from here >>> link

Im on Windows 2008 R2 with the latest version of Orthanc

E0211 16:19:44.837285 OrthancException.h:85] Cannot execute a Lua command: [string “line”]:23: 4a560c52-11ed1653-9b751fdf-11d83cd7-f40ec612-compressed.dcm: No such file or directory
E0211 16:19:44.837285 LuaScripting.cpp:655] Error while processing Lua events: Cannot execute a Lua command
E0211 16:19:45.121302 OrthancException.h:85] Cannot execute a Lua command: [string “line”]:23: 5b43ae0f-16f091cd-c1abcaf5-c8dbb650-acaf4128-compressed.dcm: No such file or directory
E0211 16:19:45.121302 LuaScripting.cpp:655] Error while processing Lua events: Cannot execute a Lua command

This most likely indicates that the “gdcmconv” software used at line 19 of the script is not installed, or not in the PATH environment variable, which causes the “…-compressed.dcm” file not to be available:
http://gdcm.sourceforge.net/html/gdcmconv.html

I have added the path to the folder containing “gdcmconv.exe” in both Path and PATH at the same time and each separately but the result is the same

Please double-check your configuration.

Introduce “print” commands to understand the issue.

This is very specific to your computer.

In addition, make sure in the path statement you are using \ for each folder location, not just one . Also, try running gdcmconf.exe to make sure it runs successfully outside of Orthanc.