EDIT: Here is an amended code using the robocopy lines you supplied in the comments and I added a filespec of *.log
to the copy version.
It has not been tested.
@echo off
pushd "\\SOURCE\Logs"
if exist *.7z (
Robocopy "\\SOURCE\Logs" "\\DEST\Logs" *.7z /mov /s /zb /r:2 /w:2 /eta /LOG+:\\DEST\move.log /NP
) else (
Robocopy "\\SOURCE\Logs" "\\DEST\Logs" *.log /s /zb /r:2 /w:2 /eta /LOG+:\\DEST\move.log /NP
)
popd
pause
This is the kind of format you can use: add the two robocopy lines
cd /d "c:\folder"
if exist *.7z (
echo move files
) else (
echo copy files
)