WinScp - SFTP copy option RRS feed

  • Question

  • Hi.

    I have a batch file, which moves multiple files from source server to a destination server through SFTP using WinSCP.

    In the destination, the files are inheriting the permission of the source folder. I want to achieve a copy functionality which only inherits the permissions of the destination location.

    Below is my existing script:

    option batch on
    option confirm off
    option transfer ascii
    open server@Ip
    cd /folder1/folder2/folder3/folder4
    LCD C:\Datafolder1\Folder2\
    put  -nopreservetime *.TXT

    How to achieve a copy functionality rather than a move in WinSCP ?


    Wednesday, July 17, 2019 10:01 AM

All replies

  • Hi Venkatzeus, 

    Thank you for posting here.

    According to your description, your issue is more related to WinScp. Therefore, it will be more appropriate to ask your question in WinScp Forum.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework.

    Thank you for your understanding.

    Note:This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, July 18, 2019 8:58 AM