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.
Wildcards in if statement
Name: DragonL Date: June 30, 2004 at 09:24:25 Pacific OS: WinXP CPU/Ram: NA
Comment:
I am using WinXP. I have a batch file that runs on every startup but I would like it to run only on a certain day of the week. I am trying to use if statements to check the date, but the %date% variable looks like Wed 06/30/04. Is there any way to use a wildcard like:
if "%date%"=="Thu*" do stuff
If anyone knows another way that would be helpful also. :)
Summary: Hi, Is it possible to have 2 or more commands in the "do something" portion of the if statement? The if statement goes if (condition) command Is it possible to have it like if (condition) (execute com...
Summary: >> if ( `echo $?` -eq 0) ahemm... sure both of you do not want to use square brackets? ;-) all these are possible: if [ `echo $?` -eq 0 ] ... if [ $? -eq 0 ] ... if [ `echo $?` == 0 ] ... ...