Kijk eens in de help van het SET commando, zie onderstaand:
%filenaam:~10,5%
would expand the PATH environment variable, and then use only the 5
characters that begin at the 11th (offset 10) character of the expanded
result. If the length is not specified, then it defaults to the
remainder of the variable value. If either number (offset or length) is
negative, then the number used is the length of the environment variable
value added to the offset or length specified.
%filenaam:~-10%
would extract the last 10 characters of the PATH variable.
Het ligt wel een beetje aan de DOS versie die je hebt.
De variabele filenaam is met een simpele FOR lus uit te lezen:
For /F %%A in ('dir /b') do call: set %%A
hmmm, net te laat
[
Voor 3% gewijzigd door
Question Mark op 14-04-2004 14:13
]
MCSE NT4/2K/2K3, MCTS, MCITP, CCA, CCEA, CCEE, CCIA, CCNA, CCDA, CCNP, CCDP, VCP, CEH + zwemdiploma A & B