faldo 9 Posted April 22, 2010 (edited) I've been searching for an hour now without finding an answer, it may be due to my lack of knowledge of correct words. Anyway, my question is if there's any way to create a script, compile it as console and send switches to to the script as variables. ie. The script called "addfolders.exe": For $i = 1 to $Switch DirCreate ( "c:\temp\FolderNr"&$i) next In CMD i want to type... addfolders.exe /10 ...to create 10 folders in that given directory. Edited April 22, 2010 by faldo RDP antihammer/blacklist generator Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 22, 2010 Command Line Parameters - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
faldo 9 Posted April 22, 2010 erhm... i'm not sure what you mean by showing me that you need to add quotes to a commandline with spaces... I need a similar function to ConsoleRead() but instead of typing: echo Hello! | ConsoleRead.exe i want to be able to type: ConsoleRead.exe /Hello! ...and get switch piped down to stdin somehow... i'm not that good at how it works :/ RDP antihammer/blacklist generator Share this post Link to post Share on other sites
faldo 9 Posted April 22, 2010 (edited) Never mind, problem solved... $CmdLine is the variable to use... thanx somdcomputerguy For those who need it, the script would look like this: For $i = 1 to $CmdLineRaw DirCreate ( "c:\temp\FolderNr"&$i) next[ and CMD command would be ScriptName.exe 10 ...to create 10 folders. Cheers! Edited April 22, 2010 by faldo RDP antihammer/blacklist generator Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 22, 2010 I'm glad you got it going. I'm not too good with words, so I'm glad that my cryptic post of just a link was good enough to help you. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites