SFS mount
win: mount -o nolock -o casesensitive=yes IP:/! X:
cat /etc/fstab
linux: 172.22.1.56:/ /mnt/powerbi nfs vers=3,timeo=600,nolock 0 0
dos文件复制
@echo off
set LogPath=D:\PowerBi\bin
set LogFileName=copy.log
set LogFile=%LogPath%\%LogFileName%_%yyyy%%mm%%dd%
echo date = %date% >"%LogFile%"
set yyyy=%date:~10,4%
set mm=%date:~4,2%
set dd=%date:~7,2%
echo %yyyy%%mm%%dd% >>"%LogFile%"
if not exist "D:\\PowerBi\Management_Dashboard" mkdir D:\\PowerBi\Management_Dashboard
set sourcepath="X:\powerbi"
echo sourcepath = %sourcepath% >>"%LogFile%"
set destinationpath="D:\PowerBi\Management_Dashboard"
echo destinationpath = %destinationpath% >>"%LogFile%"
echo curr_date = %yyyy%%mm%%dd% >>"%LogFile%"
for /F "delims=" %%L in ('D:\PowerBi\bin\datemath.cmd %yyyy% %mm% %dd% - 1') do (set "cob_date=%%L")
echo cob_date = %cob_date% >>"%LogFile%"
set cobfolder=%cob_date%
echo cobfolder = %cobfolder% >>"%LogFile%"
echo copying %sourcepath%\%cobfolder% to %destinationpath% >>"%LogFile%"
XCOPY %sourcepath%\%cobfolder%\* %destinationpath%\ /s /i /Y
echo ---- Success --- >>"%LogFile%"
Echo Proceed to run moveftpfile job >>"%LogFile%"
echo ----------------------------------------------- >>"%LogFile%"