File synchronization method using WinSCP script – downloading modified files from remote server, useful way to backup files through SSH

CK CK 3788 
Created at  
1,438 0 0

WinScp provides straightforward way can synchronize between local and remote server, if remote server has SSH daemon. Actually this is useful if you need to manage files on multiple places. Actually I use this script for purpose of backup files on my PC. Following example, shows the simple example.

 

winscp_com_backup.bat

   1: winscp /script=winscp_backup.scp

 

winscp_backup.scp

   1: # winscp file sychronization example
   2: # 
   3: # sample script by Chun Kang (kurapa@kurapa.com) - 2013-07-29
   4: option batch abort
   5: option confirm on
   6: open sftp://your_id:your_password@server_domain_name -hostkey="ssh-dss 1024 97:4a:45:f9:be:54:1e:b0:6b:59:ca:c2:5a:9d:99:db"
   7: # synchronize local -> download modified files from remote server
   8: # synchronize remote -> download modified files from local
   9: # synchronize both -> synchroize both way
  10: synchronize local "local_directory" "remote_server_directory" -transfer=binary
  11: close
  12: exit

 

Above example is the simple example synchronizing files from remote server. You can simple change the direction from local to remote server by changing option as following.

   1: synchronize remote "local_directory" "remote_server_directory" -transfer=binary

 

If you need to synchronize both way, you can do it by changing option as both. Please see below.

   1: synchronize both "local_directory" "remote_server_directory" -transfer=binary

Note that winscp.exe, and winscp.com file must be located on the same directory to perform above files. If not, please locate both winscp.exe and winscp.com to system directory. You can download the portable executables at http://winscp.net/eng/download.php#download2


[ download example ]
Tags EmailDomain FNC File Manager File Synchrnonization MP3 Phone SSH UTF8 WinAMP backup local remote upload Facebook X
Comments 0
Similar posts
  1. Check if a file exists from inside a batch file
    1,973
  2. FNC(Photo/Video File Name Changer) v1.02 release - The file created date time information is available for those cameras providing incorrect EXIF data
    978
  3. FNC(Photo/Video File Name Changer) v1.01 release
    770
  4. FNC(Photo/Video File Name Changer) v1.0 release
    786
  5. File conversion to UTF in Schell Script
    1,025
  6. Server status checking by Shell Script
    1,520
  7. Extracting the domain (host) name from an e-mail address
    492
  8. Content Manager for The world’s first MP3 Phone
    601
  9. MusicDrive – DRM enabled Secure Music Player on Microsoft Windows
    910
  1. Disconnect your RDP session when the screen saver activates on Windows 11
    545
  2. My Microsoft Windows Laptop is so Slow and Network Connectivity is NOT Stable
    2,279
  3. Enable/Disable IPv4 on Windows
    1,293
  4. Enable/Disable IPv6 on Windows
    1,742
  5. Auto Admin Logon Registry Entry for Windows 7
    1,505
  6. Remote Desktop not work after SP3 installation ?
    792
  7. How to make application speed faster
    937
  8. Changing ANY user password without having to know the existing password
    1,453
  9. Windows XP Internet Connection Sharing: Port Forwarding Difficulties
    1,339
  10. Editing your Web browser's settings for faster loading of pages
    1,109
  11. Increase bandwidth by tweaking QoS in Windows XP Pro
    704
  12. Tweak DNS Errors Caching in Windows 2000 / XP
    529
  13. Stop the system automatically rebooting after Windows Updates
    518
  14. How to change the listening port for Remote Desktop?
    702
Recently updated
  1. Google OAuth Token Expiration: Causes and Solutions
    31
  2. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    57
  3. Why SPF and DKIM Are Essential for Linux Email Servers?
    51
  4. How do I create animated background for Google Meet?
    23,197
  5. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    273
  6. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    104
  7. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    170
  8. Array of arguments passed to script in PHP
    98
  9. Invalid Auction Storms in Ad Tech
    107
  10. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    208
  11. The Two Clocks of Ad Server Architecture
    78
  12. Frequency Cap Architecture Overview
    527
  13. Collecting Proof-of-Play from 100,000 Screens
    153
  14. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    303
  15. What is RedisVL?
    116
  16. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    247
  17. TPU & GPU Cluster Management Tools
    258
  18. The Concept of Scaffolding in AI Agents
    245
  19. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    598
  20. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    268
  21. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    354
  22. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    207
  23. Machine Learning: Training vs. Ranking
    229
  24. The Continuous Learning Machine: Designing a Loop That Actually Turns
    228
  25. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    203
  26. Designing a Data Curation System Around a Vector Database
    230
  27. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    263
  28. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    674
  29. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    201
  30. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    233