Wednesday

How can I make yes/no questions is a batch file?


mplayer.exe -cache 1024 -speed 1.66 %1
SET /P ANSWER=Do you want to delete %1 file (Y/N)?
echo You chose: %ANSWER%
if /i {%ANSWER%}=={y} (goto :yes)
if /i {%ANSWER%}=={yes} (goto :yes)
goto :no
:yes
rm -f %1
exit /b 0
:no
echo file wasn't deleted
exit /b 1

more...

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...