Cadzow Knowledgebase


Welcome
Contact Us
Professional
Services

Consulting
Knowledgebase/
Site Search

Remote Support

Print Friendly

Scripting: Batch Script May Misbehave Randomly

In batch scripting, complex tasks may require storing values in environment variables, and calling other batch files or subroutines.

In this situation the various scripts/routines may malfunction.

One problem to look for is environment veriable reuse.

For example, if a batch file stores values in an environment variable called TMP1 (say), and then calls a subroutine/batch which also stores values in a variable of that name, the original batch will exihibit hard-to-debug behaviour. One remedy for this is to use environment variables named for the routine/script they are in, eg. TMP_GetDate, TMP_FileSize etc

Copyright © 1996-2023 Cadzow TECH Pty. Ltd. All rights reserved.
Information and prices contained in this website may change without notice. Terms of use.


Question/comment about this page? Please email webguru@cadzow.com.au