[pmwiki-users] Problem with trashing deleted files from a folder

Peter Bowers pbowers at pobox.com
Tue Oct 18 06:20:29 CDT 2011

On Tue, Oct 18, 2011 at 10:26 AM, kirpi at kirpi.it <kirpi at kirpi.it> wrote:
> I feel that via php one could tell the server to trash all those files
> marked as "delete"...

It's certainly possible.  There are existing recipes which do this for
*attachments* but I failed to find any that work with the deleted
pages.  (Deleted pages are simply marked with a timestamp-comma-del
such as 123434561234,del as a suffix to the filename in wiki.d.)  So
"all" it requires is a recipe to be written.  However, the fact that
most administrators simply go in and use FTP or command line to do it
means it hasn't been a high enough priority in the past and may not
become a high enough priority...

Another possibility would be to install some sort of PHP file manager
-- you can google for the following:

"file manager" OR explorer php

and you will see quite a few that can be installed.  This would be an
alternative to FTP.  Note that these programs sometimes come with
built-in security problems -- I installed one once and found I could
wander through all (!) files on the host, going well out of "my"
area...  So beware and probably uninstall it or render it inactive
after you have used it for the specific use you need it for...

Another alternative would be to go back to old-school command-line
FTP.  Some of them support the mdelete command which may or may not
support wildcards.  If you find one that supports wildcards then a
simple ftp session to delete all previously deleted pages (danger!)
might look like this:

ftp> open www.example.com
username: foo
ftp> cd pmwiki/wiki.d
ftp> mdelete *,del
confirm? y
ftp> quit

Obviously something like this should not be done without due care --
I'm typing this in without having played with this in quite some time
so I could be totally off and could be including major mistakes with
far-reaching consequences.  If so, I'll happily refund the total cost
of the advice... :-)


More information about the pmwiki-users mailing list