Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


johannes.heesters
2009-04-27T13:57:47Z
Hi there,

how can I handle that ?

The ftp user I have can also delete files.

I have a subfolder on the ftp server, i want to delete all files *.jpg in that subfolder.

How can I do that ?

PS: I can not create a ftp user that has this subfolder as startpoint.
Sponsor
Forum information
GrahamG
2009-04-27T17:52:35Z

Deletion of multiple file, *.jpg, is not a standard FTP function.

It depends on your FTP server whether any additional commands are implemented.

Can you delete the entire directory ?

Graham
johannes.heesters
2009-04-27T18:07:08Z
mdelete is a standard ftp command

I can not delete the directory due to not enough access rights.

GrahamG wrote:


Deletion of multiple file, *.jpg, is not a standard FTP function.

It depends on your FTP server whether any additional commands are implemented.

Can you delete the entire directory ?

Graham


GrahamG
2009-04-28T10:35:54Z

Hi,

You are correct, but not all clients implement it.

It would appear some implement

mdelete file1 file2 file3

whilst others implement

mdelete file*

On my test I set up here, if I use windows ftp command line, medelete file* works, if I use the VC Custom commands, it does not.

I could be wrong, but I guess it depends on which client toolkit VC is using.

I always assumed that the functionality available was driven by the server, but it would appear not.


Graham





ErikC
2009-04-28T11:20:32Z
You might want to try this with a custom FTP command.
Uses Visualcron since 2006.
GrahamG
2009-04-28T11:31:56Z
Hi Erik,

I tried this using custom commands, as per my email, but it would appear this is not supported in the VC client.

The command list from VC is

214- The following commands are recognized (* => unimplemented).
USER PORT RETR ALLO DELE SITE XMKD CDUP FEAT
PASS PASV STOR REST CWD STAT RMD XCUP OPTS
ACCT TYPE APPE RNFR XCWD HELP XRMD STOU AUTH
REIN STRU SMNT RNTO LIST NOOP PWD SIZE PBSZ
QUIT MODE SYST ABOR NLST MKD XPWD MDTM PROT


Have you managed to make this work ?

I may have misunderstood the relationship between client/server FTP functionality, so someone please correct me if so.




Graham
GrahamG
2009-04-29T10:22:08Z
Hi Johannes,

I thought of a solution for you.

1) Create an FTP download task to a temp directory and delete the source file.

2) Add a 2nd task to then delete the local copies.

Might not have been as slick as you wanted, but it will work.


Graham
ErikC
2009-04-29T10:44:39Z
GrahamG wrote:

Hi Erik,
Have you managed to make this work ?
Graham



No I didn't. It was a idea, but I did not try it.

The other one with 2 tasks you mentioned should work though, although it isn't nice. 😊

Uses Visualcron since 2006.
johannes.heesters
2009-04-29T11:03:52Z
Hello Graham,

I want to delete every sunday the complete content of our customer ftp server.
I have two subfolders on the ftp server that contain the files.
I have no right to delete and recreate this subfolders, i can only delete the files in there.

I am not sure about what you mean that I can do.
What you wrote is that i should download the content of the ftp server to a harddisk in the company, than delete the source file.
But that is what i wanted to do: delete the files on the ftp server.
Why should I download the files first ?

Sorry, but may be its because of my bad english.

Johannes

GrahamG wrote:

Hi Johannes,

I thought of a solution for you.

1) Create an FTP download task to a temp directory and delete the source file.

2) Add a 2nd task to then delete the local copies.

Might not have been as slick as you wanted, but it will work.


Graham


ErikC
2009-04-29T11:15:27Z
Why?

When you download all the files with FTP, you have an option to 'delete the source file after copy'. These files are the files on the FTP server, so after the download the FTP folder is empty.
When you download the files you have them on your company disk, but you don't need them, so just delete them.

This is what GrahamG ment.

Regards
Erik

Uses Visualcron since 2006.
GrahamG
2009-04-29T11:21:03Z
Hi,

Sorry, I'll try to re-explain.



1) Create an FTP download task to download the files on the remote server to your local server. As part of this you can set "Delete source file after copy" on copy.

See the file mask to *.jpg

You have now removed the files from the remote server.

2) Create a 2nd task on the same job, to then delete the files which you have download to the local server.

This will mean, unfortunately, you are copying the files back to your local server !


Just had another idea !!

Look at the following http://www.nsftools.com/tips/MSFTP.htm , you should be able to use this and then use the VC execute task to run a command line or batch file. The MS FTP command line client supports mdelete. This also won't require any downloads to your local server.


Let me know if you are still having problems.



Graham
GrahamG attached the following image(s):
ErikC
2009-04-29T11:24:21Z
GrahamG wrote:


http://www.nsftools.com/tips/MSFTP.htm ,
Graham



You have to remove the comma in the URL go get it to work.😉

Regards,
Erik
Uses Visualcron since 2006.
johannes.heesters
2009-05-15T14:48:26Z
Hi there,

i created a batch file that uses the mdelete command.

ErikC wrote:

GrahamG wrote:


http://www.nsftools.com/tips/MSFTP.htm ,
Graham



You have to remove the comma in the URL go get it to work.😉

Regards,
Erik


Scroll to Top