
[已解決]求助修改安裝FileZillaServer的批處理
問(wèn)題1:有的電腦能運(yùn)行,有的不能運(yùn)行,直接跳到OUT 提示 沒有找到安裝文件,請(qǐng)確認(rèn)是否已完成安裝.問(wèn)題2:無(wú)法刪除文件夾本身nclick="copycode($('code0'));">復(fù)制代碼
- @echo off
- if exist C:Progra~2FileZilla ServerFileZilla Server.xml (
- goto install86
- ) else (
- goto install64
- )
- :install86
- del /s /q /f C:Progra~2FileZilla ServerFileZilla Server.xml
- move %~dp0FileZilla Server.xml C:Progra~2FileZilla Server
- NET STOP FileZilla Server&&NET START FileZilla Server
- goto allinstallok
- :install64
- if exist C:Progra~1FileZilla ServerFileZilla Server.xml (
- goto installin
- ) else (
- goto out
- )
- :installin
- del /s /q /f C:Progra~1FileZilla ServerFileZilla Server.xml
- move %~dp0FileZilla Server.xml C:Progra~1FileZilla Server
- NET STOP FileZilla Server&&NET START FileZilla Server
- goto allinstallok
- :allinstallok
- echo. >>ipaddress.txt
- echo. >>ipaddress.txt
- echo 程序部署完成 >>ipaddress.txt
- echo. >>ipaddress.txt
- echo 以下為本機(jī)IP信息,請(qǐng)拍照或者記錄 >>ipaddress.txt
- echo. >>ipaddress.txt
- echo ------------------------------------------------------>>ipaddress.txt
- echo. >>ipaddress.txt
- ipconfig | findstr IPv4 地址>>ipaddress.txt
- echo. >>ipaddress.txt
- echo ------------------------------------------------------>>ipaddress.txt
- start notepad ipaddress.txt
- ping /n 2 127.1>nul
- del /q ipaddress.txt
- ver|findstr 5.1 >nul && (
- set m=ipconfig^|findstr /i ip address
- )|| (
- set m=ipconfig^|findstr /i ipv4
- )
- for /f tokens=14* delims=: %%1 in ('%m%')do start ftp://%%2:18003
- set /p clean=是否需要清理安裝文件 Y / N ?
- if /i %clean%==Y cd /d ... & rd /s /q %~dp0
- if /i %clean%!=Y exit
- :out
- echo.
- echo.
- echo沒有找到安裝文件,請(qǐng)確認(rèn)是否已完成安裝
- echo.
- pause

