Using WinSCP Synchronize a Directory on a Remote Machine
You can configure WinSCP to monitor a directory on the local machine and keep this synchronized with a directory on a remote machine. This allows you to edit and use other tools locally, and the changes will be reflected remotely.
Overview
Create a directory on the local system where you will work.
Create a directory on the remote system that you wish to keep synchronized with the local directory
Open WinSCP and start synchronizing folders
Edit on the local machine using the editor of your choice.
Compile on the remote machine using putty
Discussion
Configure Synchronization
In the WinSCP window, select Commands then Keep Remote Directory up to Date …
Select the local and remote directories to keep in synch.
Select Start
You may be asked if you want to perform full synchronization first. Select Yes in most cases.
Winscp should copy the files from the local directory to the remote directory
Edit local files, WinSCP will transfer these when it notices a change.
Use the putty terminal to compile and execute
When you are finished, select Stop in the Keeping remote .. window.