[Tugindia] RE: Catch-File Name
CV Radhakrishnan
cvr at river-valley.org
Sat Oct 16 10:01:06 CEST 2004
On Sat, October 16, 2004 1:21 pm, Suresh A.L. said:
> For instance, " D:/vinoth/obes/jbi_1221.tex " from this, I need to catch
> " 1221 ", through internal commands without modifying anything in "
> jbi_1221.tex " and need to show " 1221 " in dvi, as where ever I like.
> Please suggest me.
If you have file names of the fashion alpha characters followed by
underscore followed by numerals, dot and alpha characters, the following
code will provide you the number part of file name:
\makeatletter
\def\parseFile#1{\@parseFile#1\@nil}
\def\@parseFile#1_#2.#3\@nil{#2}
\makeatother
\parseFile{D:/vinoth/obes/jbi_1221.tex} ==> 1221
--
Radhakrishnan
PS: I guess, you don't understand the words "please trim your mail".
More information about the tugindia
mailing list