Stop Directory looping/scrolling

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
Message
Author
amommy
500 Command not understood
Posts: 1
Joined: 2012-03-18 00:41
First name: Heidi
Last name: P

Stop Directory looping/scrolling

#1 Post by amommy » 2012-03-18 00:48

Hi
I have been using FileZilla for quite some time and this has ALWAYS bugged me and cannot stop it.
How do I stop it from looping (or whatever you call it) through a directory when I delete it?
How do I go to ANOTHER directory while it is deleting?
I used to be able to do that with another program, ages ago don't remember which one.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#2 Post by boco » 2012-03-18 00:59

When deleting (and adding to queue, too, for that matter) many FTP servers do not allow deleting non-empty directories. Thus FileZilla has to walk the directory tree and delete all files and subdirectories first. Since that's done using the browsing connection, you cannot do anything else while it's running. I admin the solution is not optimal, but the developer surely has a reason for implementation that eludes me...
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35562
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Stop Directory looping/scrolling

#3 Post by botg » 2012-03-18 08:19

Complexity. Using the browsing connection for this task is already extremely complex. Moving it into a separate connection would be even more complex.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#4 Post by boco » 2012-03-18 22:19

@botg: Would it be possible, if the user selects to delete a complete tree, to first try to remove the dir as-is? If the server supports it (mine does), that succeeds and you just saved a lot of time. If it errors, just execute the wash-rinse-repeat cycle through the tree.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35562
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Stop Directory looping/scrolling

#5 Post by botg » 2012-03-19 07:08

It supports this without requiring additional parameters to the RMD command?

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#6 Post by boco » 2012-03-19 15:22

botg wrote:It supports this without requiring additional parameters to the RMD command?
Yes, only the pathname must be given.

Code: Select all

2012-03-19 16:19:52 - sysop-1 (10.0.0.1) > XRMD non_empty_directory
2012-03-19 16:19:52 - sysop-1 (10.0.0.1) < 250 Requested file action okay, completed.
Note the XRMD vs RMD is because I used the Windows ftp.exe for the test. The directory had subdirectories and files inside.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35562
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Stop Directory looping/scrolling

#7 Post by botg » 2012-03-19 20:24

Might be worth a try.

panamade
500 Command not understood
Posts: 4
Joined: 2012-03-26 03:55

Re: Stop Directory looping/scrolling

#8 Post by panamade » 2012-03-26 04:01

Did you try?
My IP camera uploaded erroneously around 250,000 files and the ftp process of deleting them one by one is interrupted often by connection errors, so I would need to be present for a few days to restart the deletion loop each time it stops.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#9 Post by boco » 2012-03-26 05:29

There hasn't been a new release since his post. I looked up the changelog and this doesn't seem to have been implemented, yet. Also, if your server doesn't support deleting non-empty directories, the change wouldn't affect you, anyway.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

tateu
450 Internal Error
Posts: 38
Joined: 2004-11-13 01:19

Re: Stop Directory looping/scrolling

#10 Post by tateu » 2012-03-26 08:12

Is there any reason for an ftp server not to use a recursive delete function internally and to instead rely on the client to handle it? I modified vsftpd v2.3.5 and made it handle an RMD command as recursive and put it on my test server. In my very limited testing it seems to be working fine.

I guess that if recursive delete is not part of the FTP spec, there is no way for a client to know whether or not the server handles it. In my recursive tests with vsftpd, I have only tried entering the RMD command via the custom command menu so FileZilla didn't also try a recursive delete. It seems like there could be some problems if both the client and server do a recursive delete.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#11 Post by boco » 2012-03-26 08:44

That's what happens if there's no strict rule about a feature. Both behaviors are allowed, and both must be taken care of. FileZilla so far uses the conservative approach and navigates through the subdirectories, deleting all files and the subdirectories itself.
I guess that if recursive delete is not part of the FTP spec, there is no way for a client to know whether or not the server handles it. In my recursive tests with vsftpd, I have only tried entering the RMD command via the custom command menu so FileZilla didn't also try a recursive delete. It seems like there could be some problems if both the client and server do a recursive delete.
I don't think so. After the proposed modification gets implemented, FileZilla will just try to RMD the non-empty directory first. If the server handles that, it will return success and FileZilla can move on. If the server doesn't support it, there will be an error returned. FileZilla will then fall back to the current behavior.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

panamade
500 Command not understood
Posts: 4
Joined: 2012-03-26 03:55

Re: Stop Directory looping/scrolling

#12 Post by panamade » 2012-03-26 14:00

I am not a very deeply informed specialist about ftp, so I may not have understood everything correctly.
I understand there is a RMD command that some servers but not all accept.
I imagine that this command means "remove directory" and that in order to find out if it works with a specific server one should simply try it.

How can I enter these commands with filezilla? I installed it only yesterday and find that it works a lot better than my previous WS-FTP. But the high level commands that I can give (like "delete" are obviously not exactly what the server receives, which is comfortable on one hand, but does not seem to allow to enter low-level commands.
What should I do to enter a RMD command? Mark the folder and then what ?

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Stop Directory looping/scrolling

#13 Post by boco » 2012-03-27 03:15

I understand there is a RMD command that some servers but not all accept.
The RMD command is accepted by all FTP servers. The problem is that some of them refuse to remove a directory which is not completely empty.
What should I do to enter a RMD command? Mark the folder and then what ?
Usually you mark, right-click, Delete. Currently, FileZilla then starts the known procedure we are currently discussing here.
But the high level commands that I can give (like "delete" are obviously not exactly what the server receives, which is comfortable on one hand, but does not seem to allow to enter low-level commands.
The raw communication with the server (commands sent and responses received) can be seen in the log pane. In fact, that's the purpose of the log.
How can I enter these commands with filezilla?
To send a raw command to the server, use the ''Enter custom command...'' feature in the Server menu. You must type everything manually, including all parameters like the directory name. FileZilla will then send that string to the server without any modification. You will see the server response in the log.

Example:
1. You have a non-empty directory you'd like to delete. You want to test if that server supports direct removing of non-empty directories.
2. Use the ''Enter custom command...'' and enter RMD <name of the directory>. Press OK to send.
3. Now two things could happen:
a. The server refuses and returns a 5xx error. Some print an informative text like ''Cannot remove non-empty directory'' or ''Directory not empty''. In this case, the proposed change in this thread will not affect you and FileZilla has to process the long process this is all about.
b. The server accepts and the directory is removed instantly. Note the file and directory panes in FileZilla are not updated after a raw command, you must press F5 to refresh. You will be able to remove directories much faster in the future when this gets implemented.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

panamade
500 Command not understood
Posts: 4
Joined: 2012-03-26 03:55

Re: Stop Directory looping/scrolling

#14 Post by panamade » 2012-03-28 14:41

Hi, just to let you know I resolved my particular problem via the provider of the server. They have an online file manager with which I was able to kill the entire folder instead of first deleting 250,000 files.
I had to send the command about ten times but eventually the folder was killed. Of course this does not resolve the question how filezilla can do that.

Post Reply