If I am correct and some other bizarre or user-101 factor is not to blame, and p is indeed unusable, my first desire is to begin the BAT with an IF, perhaps using the colon(:) trick for testing for a substring. Put it this way, SET TEMP_TEMP=%%~dpn1.txt leaves TEMP_TEMP unset, and While in such a DIR, with a filename as %1, the batch file correctly processes %%~n1īut anything with a p in it produces nothing, however you wish to correctly express "nothing". %1 is foo.txt (or foo) (and foo.txt exists there) I am finding that the "p" in the magic substitution string %%~_1 causes processing failure if an ampersand is in the DIR name, e.g. I bled mucho time searching before posting. I apologize in advance if this has been covered.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |