Executing a user menu command (that uses Execute through shell) on some files did not work. Nothing happened...
It turns out this is caused by a filename containing a percent character (%). Salamander just replaces $(FullName) by the filename and puts that in the batch file it executes. But CMD interprets percent characters as special: it needs doubling them (%%) to work.
Can Salamander do just that?
User menu and Percent signs
Re: User menu and Percent signs
It is generally it is a bad idea to have '%' in your filename in windows based environment. I can understand that sometimes there is no other way, but if you can, avoid it.mdruiter wrote:Executing a user menu command (that uses Execute through shell) on some files did not work. Nothing happened...
It turns out this is caused by a filename containing a percent character (%). Salamander just replaces $(FullName) by the filename and puts that in the batch file it executes. But CMD interprets percent characters as special: it needs doubling them (%%) to work.
Can Salamander do just that?
Next to actually help you .
I don't have access to the Salamander's code so I can only guess here. What Salamander apparently does is use CALL inside the command prompt to call any batch file - and it consumes the '%' the same way as CMD does so you need to double the double => alias quadruple it!
For more see the picture:
P.S. I have made a obvious mistake in the batch file (SET for the filename contains only one % to show what happens. The reason why you have to use two %% is that one serves as a holder for the second one). The mistake can be fixed, as you already mentioned, doubling the %% inside the batch file.