Search found 7 matches

by williamt31
23 Dec 2014 11:58
Forum: DOS Batch Forum
Topic: Shutdown Batch
Replies: 16
Views: 13985

Re: Shutdown Batch

Well I'm not a beer drinker, give me rum or vodka! :lol:

But I limit myself on work nights, gotta be here and ready to run at 7. I support a class room type environment and somehow there's always someone that can't read the password off the board and locks the account or other nonsense.
by williamt31
23 Dec 2014 11:07
Forum: DOS Batch Forum
Topic: Shutdown Batch
Replies: 16
Views: 13985

Re: Shutdown Batch

Ok so I forgot two things, the '/a' on the set and variable 101 (after a shutdown) :/
local vers global variables.

Hopefully I don't forget again, thanks @foxidrive
by williamt31
22 Dec 2014 09:46
Forum: DOS Batch Forum
Topic: Shutdown Batch
Replies: 16
Views: 13985

Re: Shutdown Batch

Ya'know it's really annoying, I swear what I wrote was working before I posted it and I went to play with the 'timeout' command (I thought it would give a nice to give a countdown timer) and now I can't get my code to work. :oops:
by williamt31
22 Dec 2014 08:24
Forum: DOS Batch Forum
Topic: Shutdown Batch
Replies: 16
Views: 13985

Re: Shutdown Batch

For the parameter I want to cancel the shutdown command. Ex. "Off.bat off" instead of using a number write "off" and he run the "Shutdown -a" @ECHO OFF IF %1 EQU can ( ECHO Cancelling shutdown shutdown /a GOTO END ) ELSE ( set ShutdownTime=%1*60 shutdown /s /t %Shutdow...
by williamt31
18 Dec 2014 10:07
Forum: DOS Batch Forum
Topic: Can a For loop work inside an IF statement?
Replies: 8
Views: 5200

Re: Can a For loop work inside an IF statement?

I mentioned in my previous post what was wrong with your FOR /F command and it doesnt look like you are comparing the same value. You used a 3 the first time and then a 2 the second time. I was cleaning and re-arranging at the same time. I'm working with a script that at least 2 people created and ...
by williamt31
17 Dec 2014 19:35
Forum: DOS Batch Forum
Topic: Can a For loop work inside an IF statement?
Replies: 8
Views: 5200

Re: Can a For loop work inside an IF statement?

ShadowThief I've seen it both ways, I tried it without and with. (In reguards to the spaces with the equal signs, I also tried 'EQU' at one point but I can try it again and remove spaces when I get back to work tomorrow.) The lines under 'Old Block' works I was just trying to do a capture of any inp...
by williamt31
17 Dec 2014 16:56
Forum: DOS Batch Forum
Topic: Can a For loop work inside an IF statement?
Replies: 8
Views: 5200

Can a For loop work inside an IF statement?

I have a script that I love, works well but of course I like improving things. I recently learned how to put some error catching in my script but it meant changing from a GOTO structure to a IF list. Below is a simplified stretch showing just the option I'm working on. I do have 'setlocal EnableDela...