'HOST command prefixes quotes with backslash

I have a SQL Plus script, with a code containing: host if not exist &&mksubdir (mkdir &&mksubdir) where &&mksubdir is a string in double quotes. And it worked fine until upgrading the SQL Developer to 21.4.1.349. Now it returns an error message that file or directory does not exist.

The same happens if I replace &&mksubdir with actual path in double quotes.

It seems that now every double quote in HOST command is prefixed with a backslash. I have tried: host echo "Test 01" > c:\temp\test.txt and got the result: \"Test 01\", so my guess is that cmd gets \"\some\path with spaces\" instead of "\some\path with spaces" and returns the error message.

I have tried SET ESCAPE, but it has no effect here - SET ESCAPE OFF does not get rid of this backslash and SET ESCAPE _ does not change the backslash to underscore.

I need this to spool to a file in &&mksubdir and the path contains spaces, so I need the string doublequoted.

I'm not really sure whether this behavior is implied by new version of SQL Developer or there has been some configuration change at the same time, but I couldn't google anything on such configuration.

How do I get rid of this feature and get my script to work again?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source