Window Next batch operation: Copy files from Linux machine

Source: Internet
Author: User
Tags pscp

Tagged with: Batch bat BVS

File name: Test.bat

Set THIS_BAT_PATH=%~DP0CD%this_bat_path%rd/s/q%sdv_llt_path% & MD%sdv_llt_path%
    • Path of current file: This_bat_path=%~dp0

    • CD%this_bat_path% into the path where the current file is located

    • Delete the file and create a new file: Rd MD


Call PLINK.EXE-SSH-PW Password [email protected] cd/home/test;rm TEST.TAR.GZ;TAR-ZCVF test.tar.gz test
    • Connect the Linux server 10.21.34.53 on the window and go to the/home/test file directory, delete the test.tar.gz, and compress the test


:: Windows Decompression cd/d%rar_path%winrar.exe x-y%sdv_llt_path%\*.tar.gz%sdv_llt_path%
    • Unzip the file under the Sdv_llt_path path


Call%ROOT%\PSCP.EXE-PW root [email protected]:/home/test.tar.gz%destpath%
    • Copy the files under the Linux server to the Windows machine: If the Pscp.exe file must be stored under the directory file where the Test.bat is located, the name is to copy the test.tar.gz from the 10.24.15.60Linux machine to the local Windows machine, the destination path is the de spath


xcopy%src_path%\test.tar.gz%dest_path%\/e/y/s
    • Copy test.tar.gz on the Windows machine to the destination address

Window Batch operation: Copy files from Linux machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.