A quick batch script I did to backup configuration files of multiple Alcatel Omniswitch via FTP.

In the switch flash all configuration files are named boot.cfg so the script renames each file appending the IP address of the device to avoid conflicts.

We start creating a file iplist.txt with all the IP of switches to backup


Now create a FTP script named ftp.scr to login and backup the configuration

cd ..
cd working
get boot.cfg

Default credentials are user “admin” password “switch”

Now we can create the actual script getconfig.bat that will perform the backup

for /f "tokens=*" %%i in (iplist.txt) do (
echo %%i
ftp -s:ftp.scr %%i
ren boot.cfg boot.cfg-%%i )

Now we just have to run the script and see the magic happen!