Synchronize not deleting

Advertisement

ChrisRChamberlain
Joined:
Posts:
3

Synchronize not deleting

Hi
WinSCP newbie, so please be gentle
Have three local directories to sync with three remote directories

locals being 'C:\dev\public_html\, C:\dev\public_html\pdfs\, C:\dev\public_html\images\'
remotes being '/public_html/, /public_html/pdfs/, /public_html/images/'

synchronize remote -filemask="*.pdf" C:\dev\public_html\ /public_html/
is used for testing and works for uploading to '/public_html/, but if the test *.pdfs are removed from local directory 'C:\dev\public_html\', they are not then removed from remote directory '/public_html/', when the script is run again.

What's missing please?

TIA

Reply with quote

Advertisement

ChrisRChamberlain
Joined:
Posts:
3

Re: Synchronize not deleting

martin wrote:

Thanks Martin
Have since adopted an alternative approach to using 'synchronize', instead using, for example
put C:\dev\public_html\images\6768-*.jpg /public_html/images/
to upload required files, and, for example
cd /public_html/images
rm 6768-*.jpg
to delete files from the server.

The script is generated by the Windows app and is specific to its updating requirements.

Reply with quote

martin
Site Admin
martin avatar

Re: Synchronize not deleting

I do not understand your code. You upload files. And then you delete the files you have just uploaded.

Reply with quote

ChrisRChamberlain
Joined:
Posts:
3

Re: Synchronize not deleting

martin wrote:

I do not understand your code. You upload files. And then you delete the files you have just uploaded.
The code posted is just an example showing how it works for my particular requirements.

Firstly, it shows code for a typical upload to the server.

Secondly it shows deleting the files on the server as opposed to downloading and then deleting.

The windows app generates the script each time the app runs so the file references, ie 6768-*.jpg, will change according to what is required.

So it may be necessary to upload 6768-*.jpg and remove 6760-*.jpg and the script will execute that functionality..

Hope that explanation helps?

Reply with quote

Advertisement

You can post new topics in this forum