Just a request for help with batch programming. Need to do periodic backups of certain folders and was wondering how I would achieve that.
Goal: To Scroll through a directory and compress certain folders with a certain name.
Code Logic:
//For all directories in folder
for /d %%X in (*) do (
if ( %%X != tag_****** )
"7z.exe" a -ttar "%%X.tar" "%%X\"
)
.
for %%X in (*.tar) do
"7z.exe" a -tgzip "%%X.tgz" "%%X"
How would I differentiate between folder names in batch if it is possible?
ex: compress tag_aaa111 , skip tag_aaa111_v2 , skip all folders without prefix "tag_"
condition is that the directory starts with tag_ and has exactly 6 chars after that.
Been stuck trying to figure out this. Thanks for the help.
edit: code, clarification.