Skrip Posted December 17, 2007 Share Posted December 17, 2007 (edited) How do you add to varibles..here's how to do it in AutoIt.. $var = 0 while 1 $var = $var + 1 Wend How do I do that in CMD? Sofar I have this.. set number=0 :Loop set number=number+1 echo %number% goto Loop The echo displays number+1 How do I make it add onto the 0? Edited December 18, 2007 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
jokke Posted December 17, 2007 Share Posted December 17, 2007 I used to work alot with bat's back at my old work place, where it was the only "trusted" script langue. God it was pathetic but well i guess how it works inn those biiiiig firms. I'll dig into what i manage to rescue of bat.scripts and see if i can find some nifty stuff for ya. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Skrip Posted December 17, 2007 Author Share Posted December 17, 2007 Thank you. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
jokke Posted December 17, 2007 Share Posted December 17, 2007 This is how your loop would look like, not far from what you wrote: @ECHO OFF set var=0 :loop SET /A var=var+1 echo %var% goto loop UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Skrip Posted December 18, 2007 Author Share Posted December 18, 2007 (edited) Works perfect! Thanks. Any idea how to log the output of a dir /s %input% command? Edited December 18, 2007 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Squirrely1 Posted December 18, 2007 Share Posted December 18, 2007 (edited) Works perfect! Thanks. Any idea how to log the output of a dir /s %input% command?To write the output to a file do this: dir /s %input% >> myFolderContents.log Edited December 18, 2007 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Skrip Posted December 18, 2007 Author Share Posted December 18, 2007 (edited) Ah. Thank you. EDIT: How do you do an 'else' function? like this set code= set /p code= if %code%== quit goto start if %code%== xrunx %filename% ~~IF IT IS NOT QUIT OR XRUNX DO THE CODE BELOW echo %code% >> %filename% Edited December 18, 2007 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
jokke Posted December 18, 2007 Share Posted December 18, 2007 I might as well paste code i sendt to you, if anyone would ever need it: @ECHO OFF echo Enter what you want to do: echo Eiter xrunx, or quit. set /p code= if %code%== quit goto start REM If %code% not quit echo ... if %code%== xrunx %filename% goto xrunx REM If %code% not xrunx goto end :xrunx echo Enter filename you wich to run: set /p filename= echo running %filename% call %filename% :end echo Code ending. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
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