本帖最后由 flashercs 于 2020-6-14 22:20 编辑
- REM 先获取%b%的子目录列表,保存到dir_b.txt
- md %lotid%-%m%
- (
- echo open 10.20.1.5
- echo ADMIN
- echo ADMIN
- echo bin
- echo lcd %dektop%
- echo lcd %lotid%-%m%
- echo cd /%AA%/%a%/%b%/
- echo dir * dir_b.txt
- echo bye
- )>%tmp%\temp.htp
- ftp -v -i -s:%tmp%\temp.htp
- REM 遍历%b%子目录
- REM dir 结果数据示例:不知你的ftp服务器是否设置此功能,linux server
- REM drw-rw---- 1 root root 668 Jan 3 14:46 dirc_1
- (
- echo open 10.20.1.5
- echo ADMIN
- echo ADMIN
- echo bin
- echo lcd %dektop%
- echo lcd %lotid%-%m%
- for /f "tokens=9" %%C in ('findstr /lib "d" dir_b.txt') do (
- echo cd /%AA%/%a%/%b%/%%C/img
- echo mget 1*.jpg
- )
- echo bye
- )>%tmp%\temp.htp
- ftp -i -s:%tmp%\temp.htp
- @ del /q /s %tmp%\temp.htp dir_b.txt
- start explorer %lotid%-%m%
复制代码
|