ListBackup.cmd - Simple scripts for Backup in Windows using MSDOS
Once we have backup our files there will be the occasion we need to recover a file, but, what file to restore? Using this script we can list the contents of all available backup (RAR) files, looking for a given file name. Within the script, we first set local variables, after that, we find the fin the backup directory and every directory within; each inner directory represents a backup day. This is easy task because the backup directory has a fixed name and a DIR command gives us the internal directories FOR /F "usebackq delims==" %%i IN (`dir /oe-n/b/ad %backupDir%`) do ( For each directory, we find the containing RAR files, again a DIR command helps us with it. FOR /F "usebackq delims==" %%x IN (`dir "%backupDir%\%%i\*.rar" /oen/b`) do ( The format of RAR files, when they are split in several archives is: <main RAR name>[.part<consecutive number>].rar For example, for a single file: temp.rar First file of a sequence: temp.part1.rar In cas...