@echo off
set source=d:upload
set server=\192.168.9.252lu xian
bin
set foldername=""
for /f %%i in ('date /t') do set nowdate=%%i
for
/f "tokens=1,2,3 delims=-" %%i in ("%nowdate%") do set date1=%%i&set
date2=%%j&set date3=%%k
set foldername=%date1%%date2%%date3%
if
%foldername%=="" do set foldername=%nowdate%
net use /delete
"%server%"
echo building connection to file server: %server% ...
net use
"%server%" Aa1234 /user:"ln-tfluxianbing" >nul
if "%errorlevel%" NEQ "0"
echo build connection failuer & goto END
echo.
echo copying files to %server%\%foldername%
echo.
xcopy
"%source%" "%server%\%foldername%" /E /F /D /C /Y
echo.
:END
net use /delete "%server%" >nul
echo.
echo jobs completed
...
pause >nul