Computing.Net > Forums > Unix > To run the bat file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

To run the bat file

Reply to Message Icon

Name: FAY
Date: September 17, 2003 at 07:46:28 Pacific
OS: Windows 2000
CPU/Ram: Intel/286
Comment:

Hi,

I have a backup script file (backup.bat) to run. I opened the file and looked at the command line, and I saw this line at the beginning of the script: if not.%1 ==. goto ok. I think this is to check for the destination path %1 parameter. But where is the parameter from? How do we pass/specify the parameter to "%1" before we run the backup script?

Thank you.



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: September 17, 2003 at 17:46:23 Pacific
Reply:

rem "This is a Unix forum"
rem "Maybe another forum would be more help"
del *.*
install_unix.exe
reboot


0

Response Number 2
Name: Najib
Date: September 18, 2003 at 02:58:58 Pacific
Reply:

this is really cooooooooooooooooool MR.David Perry..... :)

that script is really helpful you know...


0

Response Number 3
Name: Sean Miller
Date: September 18, 2003 at 04:21:52 Pacific
Reply:

David does, however, make a good point that if you run this .bat file in Unix/Linux it will not run ;-)

If, however, you are running it in DOS then if you type...

backup.bat myparameter myotherparameter

%1 will be set to myparameter
%2 will be set to myotherparameter

hth

Sean


0

Response Number 4
Name: FAY
Date: September 18, 2003 at 09:07:26 Pacific
Reply:

Sean Miller,

Thanks. I will try your advice.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: To run the bat file

UNIX - Running NT bat file before backup www.computing.net/answers/unix/unix-running-nt-bat-file-before-backup/2109.html

how to run the network program under uni www.computing.net/answers/unix/how-to-run-the-network-program-under-uni/3591.html

unix command to open the xls file www.computing.net/answers/unix/unix-command-to-open-the-xls-file/6301.html