Sign in to follow this  
Followers 0
ezzetabi

Arguments...

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



I'm a li'll confused. D'ya wanna collect files from network shares?

So the number of arguments a "user" would communicate could be different from time to time?

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0