Problem of Generate the name of the query end witness file

hello to all,

I have automated a process that allows queries to be executed. These are generated via command entry that points to an SQLPLUS database.

Example of a command sent:
cmd /c "sqlplus -S ORAQUERY/ORAQRY+3@FHHPP3 @K: Scripts LanceVrobot.sql name of the request > K: Recette Sorties_commandes_requetes result_name of the request.txt & type nul > K: Recette Sorties_commandes_requetes name of ticket_name of the request.txt

my problem is the following, over time, the name of the request end-run witness file is increasingly truncated.

Example: “HRRQ-15892” instead of “HRRQ-15892_P20275_GLOBECAST_DSN.txt”

Do you have an idea and am I clear enough?

Thank you in advance for your help

Try to build the command in a such way to include the file name between ". An escape for character " may help, or try to use its ASCII code.

If path and name of the file combined exceed the 260 characters limit for Windows paths, it’ll get truncated. You could check if the file path is too long and try to shorten it. Reference at Maximum Path Length Limitation - Win32 apps | Microsoft Learn

Try to debug in studio if the command is sent correctly before the execution. If not, find a way to fix it.