@echo off @if not exist \OpenPorts md \OpenPorts >nul cd \Files\ portqry -local -l \OpenPorts\%computername%__%date:~4,2%_%date:~7,2%__%time:~0,2%_%time:~3,2%.txt echo. >> C:\OpenPorts\%computername%__%date:~4,2%_%date:~7,2%__%time:~0,2%_%time:~3,2%.txt echo. >> C:\OpenPorts\%computername%__%date:~4,2%_%date:~7,2%__%time:~0,2%_%time:~3,2%.txt echo Filename is: computername_month_day_hour_minute >> C:\OpenPorts\%computername%__%date:~4,2%_%date:~7,2%__%time:~0,2%_%time:~3,2%.txt :End