I'm using Powershell as the main script language on our Windows servers, and for this particular case I use it to trigger a Jython script that is run by wsadmin (WebSphere command line).
One of the arguments is the full path to a file, all fine, except when the path separator is followed by for instance the letter 't', which then is understood by Jython as '\t', in other words the special char for tab.
I have added three lines in the script like this
print getTimeStamp() + " [DEBUG] This is the name of the script: ", str(sys.argv[0])
print getTimeStamp() + " [DEBUG] Number of arguments: ", len(sys.argv)
print getTimeStamp() + " [INFO] Script argument should be the patht to the property file: " , str(sys.argv)
If the argument to the script is without "special charaters", the output is like this
2021-01-14 15:55:48 [DEBUG] This is the name of the script: e:\scripts\klpbpm\deployments\klporders-6336\stest-dns-aliaes.prop]
2021-01-14 15:55:48 [DEBUG] Number of arguments: 1
2021-01-14 15:55:48 [INFO] Script argument should be the patht to the property file: ['e:\\scripts\\klpbpm\\deployments\\klporders-6336\\stest-dns-aliaes.prop]']
But when the file starts with the letter 't' it is a different story, it is missing and causing the script to fail.
2021-01-14 23:23:42 [DEBUG] This is the name of the script: e:\scripts\klpbpm\deployments\klporders-6336 est-dns-aliaes.prop]
2021-01-14 23:23:42 [DEBUG] Number of arguments: 1
2021-01-14 23:23:42 [INFO] Script argument should be the patht to the property file: ['e:\\scripts\\klpbpm\\deployments\\klporders-6336\test-dns-aliaes.prop]']
Any hints on how I could avoid this issue?