標籤:windows 伺服器 防火牆 false 軟體
一.部署環境
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/4D/CD/wKioL1RaIHfyxsczAABCFGZ8TsA999.jpg" title="捕獲.JPG" alt="wKioL1RaIHfyxsczAABCFGZ8TsA999.jpg" />
serv-u安裝好了後,設定好被動連接埠。telnet ip+連接埠看是不是正常的。(防火牆要開放連接埠)
二、設定flashfxp
開啟FlashFXP,串連網站,將要上傳和下載的檔案排入佇列,然後將隊列另存新檔fqf檔案[2]:
650) this.width=650;" width="600" height="411" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213019946.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
2.建立計劃任務
650) this.width=650;" width="600" height="411" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213020655.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213020537.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213021310.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213021199.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213021571.jpg" border="0" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
驗證雙機檔案互備:
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213022736.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213022547.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
650) this.width=650;" src="http://www.myhack58.com/Article/UploadPic/2013-8/201386213023593.jpg" border="0" title="在新視窗開啟圖片" style="border:1px solid rgb(250,247,239);color:rgb(51,51,51);font-size:14px;white-space:normal;font-family:‘sans serif‘, tahoma, verdana, helvetica;line-height:18px;background-color:rgb(255,255,255);" />
三、bat使用
擷取昨天時間
@echo off
set YE=%date:~0,4%
set MO=%date:~5,2%
set DA=%date:~8,2%
set DG=1
set/a vY1=%YE% %% 400
set/a vY2=%YE% %% 4
set/a vY3=%YE% %% 100
if %vY1%==0 (set var=true) else (if %vY2%==0 (if %vY3%==0 (set var=false) else (set var=true)) else (set var=false))
set LY=%YE%
set LM=%MO%
if %MO:~0,1%==0 (set MO=%MO:~1,1%)
if %DA:~0,1%==0 (set DA=%DA:~1,1%)
if %DA% GTR %DG% (set/a LD=%DA%-%DG%) else (
if %MO%==1 (set/a LY=%YE%-1) & (set/a LM=12) & (set/a LD=31+%DA%-%DG%) else (
set/a LM=%MO%-1
if %MO%==3 (if %var%==false (set/a LD=28+%DA%-%DG%) else (set/a LD=29+%DA%-%DG%))
for %%a in (2 4 6 8 9 11) do (if "%MO%"=="%%a" (set/a LD=31+%DA%-%DG%))
for %%b in (5 7 10 12) do (if "%MO%"=="%%b" (set/a LD=30+%DA%-%DG%))))
if %LM% LSS 10 set LM=0%LM:~-1%
if %LD% LSS 10 set LD=0%LD:~-1%
set strLstDt=%LY%%LM%%LD%
echo 昨天的日期為:%strLstDt%
pause
以前的指令碼有問題,主要是ftp.txt中的bye沒去掉,把ls的結果給看成了下載的結果
而且試了一下,在ftp指令碼中使用get會有問題,還沒找到原因。使用mget即可,但需要ftp帶-i參數去掉mget的提示:
echo cd autoruns>ftp.txt
echo mget *>>ftp.txt
echo bye>>ftp.txt
ftp -i -A -s:ftp.txt 10.1.103.10
如果不是匿名的:
echo username>ftp.txt
echo password>>ftp.txt
echo cd mydir>>ftp.txt
echo mget *>>ftp.txt
echo bye>>ftp.txt
ftp -i -s:ftp.txt 10.1.103.10
如上ftp程式僅對與XP SP2,這下真。的對了
不過說明一下,這隻是下載了目錄中的檔案,如果有子目錄,那還需要用dir命令輸出,並轉向輸出到文本,用find來提取目錄,如:
echo cd autoruns>ftp.txt
echo dir>>ftp.txt
echo bye>>ftp.txt
ftp -A -s:ftp.txt 10.1.103.10 |find "<DIR>">result.txt
for /f "tokens=2,3*" %%i in (result.txt) do echo %%k
如有子檔案夾,那就要深入編寫了
mget和get區別 mget下載可以用*23.rar
關閉互動模式
先prompt off
再用mget
ftp下載檔案夾命令
get 【ftp地址和路徑】【本地路徑】斷行符號
本文出自 “一行學習” 部落格,請務必保留此出處http://hnetworks.blog.51cto.com/9559654/1572687
windows伺服器自動備份上傳軟體+bat