Help on string manipulation needed
Posted: 02 Nov 2011 08:56
Hello all,
I try to extract the first 6 characters of a given filename to produce a command. Given a file name of M00091.het the following script
FOR %%f IN (*.het) DO F:/HERC370/HERCULES/HETINIT -i D:/Programme/HERCULES/zOS/tapes/HSM1/DONE/%%f %%F:~0,5 HERCULES
should produce a command
HETINIT D:/Programme/HERCULES/zOS/tapes/HSM1/DONE/M00091.HET M00091 HERCULES
but the string extraction only produces %F:~0,5 . So what am I missing ? Any help is appreciated.
Greetings from lower bavaria
Christian
I try to extract the first 6 characters of a given filename to produce a command. Given a file name of M00091.het the following script
FOR %%f IN (*.het) DO F:/HERC370/HERCULES/HETINIT -i D:/Programme/HERCULES/zOS/tapes/HSM1/DONE/%%f %%F:~0,5 HERCULES
should produce a command
HETINIT D:/Programme/HERCULES/zOS/tapes/HSM1/DONE/M00091.HET M00091 HERCULES
but the string extraction only produces %F:~0,5 . So what am I missing ? Any help is appreciated.
Greetings from lower bavaria
Christian