@ECHO OFF REM Configuration Navision SET IP_Enterprise=IP_Navision SET location_Enterprise_webshop_out=\\%IP_Enterprise%\EXDC\WEBSHOP\OUT\ SET location_Enterprise_webshop_out_backup=\\%IP_Enterprise%\EXDC\WEBSHOP\OUT\PRC\ SET file_extension_Enterprise_webshop_ZIP=ZIP REM Logging SET indication_logging=1 SET indication_logfile_append=0 REM SET file_log=%location_Enterprise_webshop_out%Export2Webshop.log SET file_log=\\%IP_Enterprise%\EXDC\WEBSHOP\Export2Webshop.log REM Option (if no write-privilege on share) REM SET file_log=C:\EXDC\OUT\Export2Webshop.log :LOG IF NOT %indication_logging%==1 GOTO ZIP IF NOT %indication_logfile_append%==1 DEL %file_log% ECHO Date: >> %file_log% DATE /T >> %file_log% ECHO Time: >> %file_log% TIME /T >> %file_log% ECHO -------------------------------------------------- >> %file_log% PING %IP_Enterprise% >> %file_log% ECHO -------------------------------------------------- >> %file_log% ECHO ZIP-files: >> %file_log% DIR %location_Enterprise_webshop_out%*.%file_extension_Enterprise_webshop_ZIP% >> %file_log% :ZIP IF %indication_logging%==1 ECHO -------------------------------------------------- >> %file_log% && ECHO Start export ZIP: >> %file_log% FOR %%i in (%location_Enterprise_webshop_out%*.%file_extension_Enterprise_webshop_ZIP%) DO CALL :FILE_TRANSFER %%i :ZIP_END GOTO FINISH :FILE_TRANSFER SET file_in=%1 SET file_out=%~nx1% SET file_out=%location_Enterprise_webshop_out_backup%%file_out% IF %indication_logging%==1 ECHO ---------- >> %file_log% && ECHO COPY %file_in% %file_out% >> %file_log% COPY %file_in% %file_out% >> %file_log% GOTO :EOF :FINISH