简体   繁体   English

移至ftp的子文件夹

[英]move to subfolder of ftp

unsuccessful trying to connect directly into subfolder of ftp. 尝试直接连接到ftp的子文件夹失败。

it showing 它显示

unknown host ftp://ftp2.xxx.com/test/949010 . 未知主机ftp://ftp2.xxx.com/test/949010 need help please.thanks 需要帮助。谢谢

SET "Server=ftp://ftp2.xxx.com/test/949010"
SET "UserName=xxx"
SET "Password=x:nj*~A+"

SET "Commands=%TEMP%SendToFTP_commands.txt"

    ECHO %UserName%> %Commands%
    ECHO %Password%>> %Commands%
    ECHO binary >> %Commands%
    ECHO put "C:\Users\Desktop\Processed\*" >> %Commands%

    REM Close the FTP connection.
    ECHO close  >> %Commands%
    ECHO bye    >> %Commands%   


    REM Perform the FTP.
    FTP -d -i -s:%Commands% %Server%

    ECHO.
    ECHO.
    pause
    REM Clean up.
    IF EXIST %Commands% DEL %Commands%

You should use mput *.* (multiple put), if you have many files to upload 如果要上传的文件很多,则应使用mput *.* (多次放置)

Here are a list of commands you can use. 这是您可以使用的命令列表

And of course change this line : 当然,请更改此行:

SET "Commands=%TEMP%SendToFTP_commands.txt"

to this : 对此:

SET "Commands=%TEMP%\SendToFTP_commands.txt"

I include below to the subfolder 我在子文件夹中包含以下内容

ECHO %UserName%> %Commands%
    ECHO %Password%>> %Commands%
    REM FTP subfolder of in/
    ECHO cd in/%%X>> %Commands%
    ECHO binary >> %Commands%

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将文件移动到目标目录的子文件夹中 - Move files into a subfolder of a destination directory 从文件名的后缀创建子文件夹,然后移动文件 - Create subfolder from suffix of filename then move file 将特定子文件夹中的文件移动到另一个子文件夹 - Move files in specific subfolders to another subfolder 脚本Windows FTP移动并重命名文件 - Script Windows FTP move and rename file 批处理文件以在文件夹中创建新的子文件夹,将文件移动到目录中所有文件夹的新创建的子文件夹 - batch file to create new subfolder in folder, move file to newly created subfolder, for all folders in directory 如何将特定文件夹的每个子文件夹中的所有 *.pdf 文件移动到每月创建的子文件夹? - How to move all *.pdf files in each subfolder of a specific folder to a monthly created subfolder? Windows 7 Batch - 创建子文件夹,然后查找文件名中包含特定文本的文件并将这些文件移动到新创建的子文件夹中 - Windows 7 Batch - Create subfolder, then find files with certain text in file name and move those files in the newly created subfolder 用相同的名称创建新的子文件夹并将文件移动到新文件夹 - Create new subfolder with same name and move files to the new folder 创建批处理文件以删除,重命名和移动多个文件的多个子文件夹 - Create batch file to delete,rename and move multiple files multiple subfolder 根据子文件夹中的文件类型创建子文件夹,然后移动该类型的所有文件 - Create subfolders based on file types in subfolder and move everything of that type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM