Jump to content

Arguments...


ezzetabi
 Share

Recommended Posts

The %0% %1% %2%... system works well until you know the meaning and the number of arguments the users sent, but I'd like make a script where the user can send ANY number of arguments.

Like this:

copyif computername file(s) destination [file(s)] [destination] [file(s)] [destination]...

and let the script attempt to copy only if computer is on

(errorlevel of ping -n 1 -w 50 %1% is 0)

I'd dislike just make lots of "copy" command with %3%, %4%, %5% ect...

:whistle:

There is a way to do this?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...