Delete Files

Advertisement

franclim_mendes@...
Guest

Delete Files

Hello,

I want do donwnload files from sftp address to and I have used getFiles function. One of the parameters is remove files on original location. The files are in a folder.
When I call this function, it also has deleted my folder.
I've tried move instruction and remove instruction too.
In every cases my original folder is deleted, s this normal?

Can anyone help me ?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,254
Location:
Prague, Czechia

Re: Delete Files

That depends on what your arguments to GetFiles are.

If you download the folder itself, the folder is also deleted:
session.GetFiles("/remote/path", ..., true)

If you download the files in the folder, the folder itself is not deleted:
session.GetFiles("/remote/path/*", ..., true)

Reply with quote

Advertisement

You can post new topics in this forum