RE: A Batch Tutorial 05-21-2012, 07:11 AM
#5
Code:
if '%pass%' == 'world' goto correct
goto failHere I would check if it's not 'world' then goto :fail if it's not, otherwise it will avoid that check and goto :corrrect anyways, so there's no need for goto :correct in there.
Rest of the tutorial is okay... Other than here:
Code:
echo hello world > new.txt
::append to a file
echo hello world >> new.txtWhere it should be mentioned that paths with spaces should be wrapped in quotes.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)