Jump to content

batch programming


Recommended Posts


also, you seem to manage the %~n1 variable, in the process, what happens to the EXTENSION of the file?

%~x1 or %~nx1 management appears to be missing. :unsure:

To expand on Yzöwl's note on the use of ERRORLEVEL, the syntax you are using is "DOSsish" under 2K/XP/2003, you can also use the %ERRORLEVEL% variable, as such, this:

if errorlevel 3 goto fin

can be written also as:

if %errorlevel%.==3. goto fin

but you can also use the other operators, like equ, lss, gtr, etc.:

http://www.robvanderwoude.com/errorlevel.html

which could make you get rid of one of the IF checks

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...