Search found 2 matches

by sandbelt
30 May 2021 15:25
Forum: DOS Batch Forum
Topic: Unexpected DOS shell expansion of %~n1 and %~x1
Replies: 4
Views: 4620

Re: Unexpected DOS shell expansion of %~n1 and %~x1

Thank you, yes, I knew about the expansion rules (interesting in themselves). And thank you for pointing out that the "*.*" case is regular after all - I had totally overlooked "." and ".." . But that was not the reason for my post. The effect I am curious about appeared in a simple script to pass w...
by sandbelt
28 May 2021 15:51
Forum: DOS Batch Forum
Topic: Unexpected DOS shell expansion of %~n1 and %~x1
Replies: 4
Views: 4620

Unexpected DOS shell expansion of %~n1 and %~x1

I always supposed that the DOS shell has no automatic wildcard expansion. But I have just noticed such an effect with the %~n and %~x syntaxes, which are expanding to the first matching file name and/or extension IF there is such a match, except if the passed parameter is '*.*', which goes totally h...