With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.
@echo off setlocal enabledelayedexpansion IF "%~1" EQU "" ( ECHO PLEASE DRAG AND DROP YOUR EMAIL LIST FILE. ECHO IN A TEXT FORMAT ".txt" NOT EXCEL FORMAT. PAUSE EXIT ) IF "%~x1" NEQ ".txt" ( ECHO YOUR LIST FILE MUST BE IN A TEXT FORMAT ".txt". PAUSE EXIT ) SET Output=%~dpn1_Winners%~x1 ECHO Please enter the number of desired winners SET /P WinnersNumber= SET Count=0 FOR /F "usebackq delims=" %%A IN ("%~1") DO SET /a Count+=1 ECHO There are [%Count%] email(s) and [%WinnersNumber%] winners to be. ECHO. FOR /L %%G IN (1,1,%WinnersNumber%) DO ( ECHO Draw Number:%%G PING 127.0.0.1 -n 1 >NUL FOR /L %%A IN (1,1,50) DO ( SET /a Val = !random! %% %Count% + 1 TITLE !Val! PING 127.0.0.1 -n 1 >NUL ) CALL :Draw "%~1" ECHO [!TheWinnerIs!] ECHO %date%,%time%,!TheWinnerIs!>>"%Output%" ECHO. ) PAUSE EXIT :Draw SET /a ValSkip=%Val% - 1 FOR /F "usebackq skip=%ValSkip% delims=" %%A IN ("%~1") DO ( SET TheWinnerIs=%%A exit /B )
Join the community of 500,000 technology professionals and ask your questions.