Search found 5 matches

by ldrechsler
28 Aug 2009 14:59
Forum: DOS Batch Forum
Topic: How do I determine the number of arguments?
Replies: 7
Views: 11466

RESOLUTION

Wow, it was actually easier than I thought. Thanks jaffamuffin for pointing me in the right direction! Here's a sample command line: MyScript.bat /ARG1 One-var /ARG2 Two vars /ARG3 3 vars here /ARG4 One more var here /ARG5 1 2 3 4 5 /ARG6 4 + 1 + 1 = /ARG7 You guessed it, 4+1+1 = 7 ! -- Capture the ...
by ldrechsler
27 Aug 2009 15:37
Forum: DOS Batch Forum
Topic: How do I determine the number of arguments?
Replies: 7
Views: 11466

Great Stuff!!!

This is great stuff...thanks guys. I still haven't been able to get the results I want though. When I first started on this project, I was simply passing single element variables to MyScript.bat (i.e. MyScript.bat Var1 Var2 Var3...). A new requirement to handle multi-element variables threw that out...
by ldrechsler
24 Aug 2009 16:49
Forum: DOS Batch Forum
Topic: A very simple question!
Replies: 2
Views: 4989

I'm not sure what you're asking for...

Are you trying to COPY files from one folder to another, trying to execute a program in a different folder, or ??? Just guessing, but it looks like you're using some variant of Linux or perhaps OSX (based on the CDROM/fscommand path). Could you tell us a little more about what you want to accomplish...
by ldrechsler
24 Aug 2009 16:38
Forum: DOS Batch Forum
Topic: Implement log and perhaps reboot "yes or no" featu
Replies: 4
Views: 6999

If you need screen output and a log file , I would approach it this way... set InstallLog=C:\Install.log set App=Adobe Reader echo Starting installation of %App%... start /wait adobereader.exe /sAll /rs /l /msi"/qb-! /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES" echo %App%...
by ldrechsler
24 Aug 2009 16:14
Forum: DOS Batch Forum
Topic: How do I determine the number of arguments?
Replies: 7
Views: 11466

How do I determine the number of arguments?

Hi, I want to allow users to pass up to 5 arguments into my batch file. For example, a user might enter MYBATCH Arg1 Arg2 Arg3 . Only the first argument is required. I also want to set a variable to hold the args. Using the above example, I would try myvar="Arg1 Arg2 Arg3" Any ideas? This ...