Many people still use telnet (client) for checking if port is open on remote host.
The Powershell cmdlet Test-NetConnection is the new and improved tool for this and by creating a function alias in your profile settings you can have it easily available at any time without remembering the syntax.
/E = Copies subdirectories. Note that this option includes empty directories. If you wish to exclude empty directories, use /S.
/W:1 = Specifies the wait time between retries, in seconds. The default value of N is 30 (wait time 30 seconds).
/R:1 = Specifies the number of retries on failed copies. The default value of N is 1,000,000 (one million retries).
/XC = Excludes changed files.
/log+: = Writes the status output to the log file (appends the output to the existing log file).
Windows batch script to setup a scheduled task to run the robocopy command:
title Robocopy Backup
echo Initial configuration for automatic backup with Robocopy + Task Scheduler
echo Step 1 - setup Robocopy:
set /p src=Backup FROM dir:
set /p dest=Backup TO dir:
echo cd %userprofile%\Desktop
echo robocopy "%src%" "%dest%" /E /W:1 /R:1 /XC /log+:"robocopy_log.txt"
echo Step 2 - setup Task Scheduler:
schtasks /create /tn "Robocopy Backup" /tr "%userprofile%\robocopy.bat" /SC HOURLY
Copy & paste the text into a text editor and save it as a .bat file to make it executable.
When running this script you will setup a scheduled task which runs the robocopy.bat file every hour. Really great and time-saving if you work in a local folder on your C drive and wish to periodically take incremental backups to a network storage for instance.