Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Batch File Question

Author
Message
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 27th Feb 2004 03:01
In a batch file is it possible to get the command line being passed to it?

All help would be greatly appreciated


Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 27th Feb 2004 03:25
If I remember rightly, you use %1 and %2 etc. for each argument in the command line ... I think.

I haven't used a batch file in around 10 years. hehe

So if ya batch file is called runme.bat
and you type runme Now YouTwat
Then %1 will refer to now and %2 will refer to YouTwat.

I could be 100% wrong, but give it a go.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 27th Feb 2004 03:28 Edited at: 27th Feb 2004 03:30
I'll try

[edit] works!


Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 27th Feb 2004 03:37
Well tie me up and call me sex meat!! Even my 10 year old memory serves me well!

Insiiiiiiiiiiiiiiiiiiiiiiiide!
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Feb 2004 04:03 Edited at: 27th Feb 2004 04:04
good ol' %1....%n arguments.

-RUST-
"What the... Mooooooooooo!"

Login to post a reply

Server time is: 2024-11-24 20:04:55
Your offset time is: 2024-11-24 20:04:55