——————开始———————
共享文件夹无法运行.bat脚本 CMD.EXE运行,UNC路径不支持, 在
:: 处理售后部分数据 pushd %~dp0 #将当前文件夹指向共享文件夹 cd code python 1-aftersale.py python 2-write2sql_overall.py popd pause #重新退出当前文件夹指向
::确保能进入本地的该文件夹(涉及共享文件时 似乎为必须) cd %~dp0 if not exist "stored_data(alert)\input_data(alert)" mkdir "stored_data(alert)\input_data(alert)" if not exist "stored_data(alert)\processed_data(alert)" mkdir "stored_data(alert)\processed_data(alert)" if not exist "stored_data(alert)\output(alert)" mkdir "stored_data(alert)\output(alert)" ::clear folder stored_data(OS update alert) del /F /Q "stored_data(OS update alert)"*.* mkdir "stored_data(OS update alert)\step1" mkdir "stored_data(OS update alert)\step2" mkdir "stored_data(OS update alert)\step3" mkdir "stored_data(OS update alert)\step4" mkdir "stored_data(OS update alert)\step5" :: clear all files in stored_data(OS update alert) ::run statistic config to get statistic result for OS version, type, model START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step1 version" -i "stored_data(alert)\processed_data(alert)" -o "stored_data(OS update alert)\step1" if "%errorLevel%"=="1" goto :end START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step2 type" -i "stored_data(alert)\processed_data(alert)" -o "stored_data(OS update alert)\step2" if "%errorLevel%"=="1" goto :end START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step3 model" -i "stored_data(alert)\processed_data(alert)" -o "stored_data(OS update alert)\step3" if "%errorLevel%"=="1" goto :end START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step4 concat2" -i "stored_data(OS update alert)\step2" -o "stored_data(OS update alert)\step4" if "%errorLevel%"=="1" goto :end START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step4 concat3" -i "stored_data(OS update alert)\step3" -o "stored_data(OS update alert)\step4" if "%errorLevel%"=="1" goto :end ::Move step 4 results to require table, step1 result left join step 4(see sheet "matching" process in step5 config) MOVE "stored_data(OS update alert)\step4\"*.* "require_tables\" ::final step START /WAIT DataHandler.exe -c "config_calc_amount(India) - OS calc step5" -i "stored_data(OS update alert)\step1" -o "stored_data(OS update alert)\step5" if "%errorLevel%"=="1" goto :end DEL "require_tables\"calc_amount(India)*.xlsx
——————结尾——————
浙公网安备 33010602011771号