ulaoulao December 21, 2010 at 10:35:07 Specs: xp32, 555 phenom
I have a path x:\ in there I could have 1 to 4 files. I want to use them in a bat file but they are created in the bat file and not ready before hand. My target platform would be xp/vista. How can I get at minimum the first file found in to a var?
The syntax %~1 expands %1 removing any quotes. But if it has any spaces, then you need the quotes to surround the whole pathname, otherwise they will be taken as separate parameters, "x:\file" and "name.gcm".
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.