Generalhow to produce multiple files in one step?

General information and discussion about TeXnicCenter
ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

Re: how to produce multiple files in one step?

Post by ptoche »

I know I'm being greedy.

I have tried to insert this:
del /y "%~f1" FiguresMake.aux
del FiguresMake.aux
rm FiguresMake.aux
at the end of the batch file but it didn't work...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

how to produce multiple files in one step?

Post by T3. »

ptoche wrote:Yes I'm using vista.

Yes adding the .tex extension was sufficient. The batch file works now.
Ouch! This looks like a pretty nasty bug in MiKTeX. I get 'Unsupported command-line option' for 'latex foo' and for 'latex \input{foo} I get: File `foo.tex' not found. Could you file a bug report with MiKTeX team? I'm sure Christian would like to know about it.

BTW, for the future it is always good to include the information about the system and TeX distro you use in your posts.
ptoche wrote:okay, I get it: the file named Fig0.tex is just a temporary file. I do not need to create a file of that name, it will be created automatically in the process (I may as well name it tmp.tex). I get it.
Yes, you get it right. I meant to explain that in my last post but had to hurry up. Sorry.
ptoche wrote:Since I have you on the line, may I ask you one more thing. The compilation produces the following files: the said Fig0.tex, and the usual .aux, .log and .dvi extensions of the Master file.
A simple 'del Fig0.*' (or whatever you call those temp files now) after the for loop should do it.
ptoche wrote:where would you recommend I look for information on batch files related to LaTeX, do you know any good url on that?
If you have questions about batches specific to LaTeX, post them on this forum (preferred) or contact me privately. For general batch questions and information see the advice I gave to another poster here.

Cheers,

Tomek
ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

Re: how to produce multiple files in one step?

Post by ptoche »

Tomek: a very warm thank you for your generous help.

Yes, I'll follow up on these links and use your tips.

I'll be dormant for a week or so -- our baby just born!
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

how to produce multiple files in one step?

Post by T3. »

ptoche wrote:I'll be dormant for a week or so -- our baby just born!
Congratulations!

Cheers,

Tomek
ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

how to produce multiple files in one step?

Post by ptoche »

Hi Tomek,

I have finally managed to switch on my computer again.

Thanks for your generous offer to help with batch file creation.
T3. wrote:A simple 'del Fig0.*' after the for loop should do it
whether I add del Fig0.*, rm Fig0.* or even erase Fig0.*, the error message I receive is :

Code: Select all

'rm' is not recognized as an internal or external command
I could be wrong, but the problem may have something to do with the properly calling the filepath. I unsuccesfully tried things like:

Code: Select all

rm "D:/Simulations/latex/tmp.tex"
rm "D:\Simulations\latex\tmp.tex"
rm "%~f1" tmp.tex
Any ideas?


P.S.
wow, parenthood is quite something: 3 hours for us, 2 hours for him, 3 hours for us, 2 hours for him, and so on indefinitely ...

P.P.S. forgot to say, I use windows vista and the latest miktex with texniccenter
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

how to produce multiple files in one step?

Post by T3. »

ptoche wrote:

Code: Select all

'rm' is not recognized as an internal or external command 
[snip]

Any ideas?
Well, 'rm' is a Unix command and therefore is not recognized as the error message clearly says. You need to familiarise yourself with the basic commands and their syntax or won't make much progress with batch scripting.
ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

how to produce multiple files in one step?

Post by ptoche »

Thanks Tomek,

What I mean is that "del" "rm" and "erase" all produce the following error message:

Code: Select all

'rm' is not recognized as an internal or external command 
so the batch file takes "del" to be equivalent to "rm" and produces the error message above.

shouldn't "del" be a recognized command?

Thanks again,

Patrick.

P.S. Now it's 2 hours for us, 3 hours for him, 2 hours for us, 3 hours for him!!
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

how to produce multiple files in one step?

Post by T3. »

ptoche wrote:so the batch file takes "del" to be equivalent to "rm" and produces the error message above.
It certainly does not do such a thing. You simply must have left 'rm' somewhere in your script. Check it carefully and you will find it.
ptoche wrote:P.S. Now it's 2 hours for us, 3 hours for him, 2 hours for us, 3 hours for him!!
Sounds like fun ;)

Cheers,

Tomek
ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

Re: how to produce multiple files in one step?

Post by ptoche »

Thanks Tomek.
Post Reply