I create many one-action .bat that accept drag-and-drop and simply pass the appropriate switch to the main executable. The problem with .bat files is that I cannot reliably handle ANY name that was passed to me!
People complain that my programs do not work due to ridiculous names in paths or files. The most common examples contain characters like ()%!& And very long names, etc.
I searched for this problem and the answer always eludes; but how in the world would I avoid a line that comes to me with arguments like %1 ? So far I have used the short form 8.3 of the name, "%~s1" , until it worked too ...
My question is: should I stop using Windows batch scripts? since I still need to program for XP, I donβt even want to look at PowerShell (or any dependencies on Python or any other scripting language).
source share