Supposing your task is to:
The simplest solution is to use -delete switch of put or get commands. It makes WinSCP delete the source file after it is successfully transferred. See guide to automating file transfers.
If you want to remove the source files in batch (i.e. remove all files at once only after all of them are transferred) you cannot do with just the -delete switch. Instead use simple transfer in the script, but make sure to enable XML logging. After whole script successfully completes, parse the resulting XML log file to find a list of transferred files. You can then remove all files on the list at once.
Site design by Black Gate