aeribus Posted September 26, 2011 Posted September 26, 2011 (edited) First of all, I'm very new to batch/command scripting. The problem that I'm having is, while working on a script, from time to time I'll get a "The syntax of the command in incorrect" error. I can normally work my way through the script to find the problem, however, with the lack of information that I'm receiving this is a very tedious task. So my question, is there a way to get any information about the error (e.g. line number, etc.), similar to Perl's use warnings and use diagnostics? I have tried searching google and this site but so far, I've come up empty. Edited September 26, 2011 by aeribus
jaclaz Posted September 26, 2011 Posted September 26, 2011 First of all, I'm very new to batch/command scripting. The problem that I'm having is, while working on a script, from time to time I'll get a "The syntax of the command in incorrect" error. I can normally work my way through the script to find the problem, however, with the lack of information that I'm receiving this is a very tedious task. So my question, is there a way to get any information about the error (e.g. line number, etc.), similar to Perl's use warnings and use strict? I have tried searching google and this site but so far, I've come up empty.No.All you can do is to put a PAUSE statement with an ECHO one, somethng like:ECHO This is where I test command xyzPAUSE and "move it" inside the batch to the point where you are working on.More generally Syntax is not something you learn by writing a random command and see if it works or gives an error, rather you study the syntax, then try executing the command(s) on command line, then you put them into the batch.jaclaz
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now