Translations of this page:
- 日本語 (ja)
- English (en)
最近の更新
- 03 Zed editor 設定 [Windowsでビルド]
- 09 ↷ 50_dialy:2025:09:09 から 50_dialy:2025:09:08 へページを名称変更しました。
- 06 ↷ 50_dialy:2025:06 から 50_dialy:2025:09:06 へページを移動しました。
最近の更新
How to synchronize a remote folder using WinSCP on Windows.
In this case, we'll connect using key authentication, with everything stored in the `Desktop\Sync` folder.
Desktop\Sync sync.bat upload.txt key.ppk
Synchronize the local folder `C:\Users\hogehoge\` with the remote folder `sync`.
※ If the path contains Japanese characters, the encoding of `upload.bat` must be Shift-JIS to avoid errors.
upload.bat
@rem sync
set LOCAL="C:\Users\hogehoge\"
set REMOTE="sync"
set SESSION="sftp://matsui@hogehoge.com"
"C:\Program Files (x86)\WinSCP\winscp.exe" /script=upload.txt /parameter %SESSION% %LOCAL% %REMOTE% /console /log=upload.log /privatekey=key.ppk
※ The `-delete` option deletes files on the remote side that do not exist locally.
upload.txt
option exclude "./03_App/Atom/; ./02_Photos/; */_old/; ./99_*/" open %1% lcd %2% cd %3% synchronize remote -delete -criteria=time exit
※ To exclude folders, list them in `option exclude` (use `;` to separate multiple paths)