#!/usr/bin/perl # # AUTHOR: Archon810 # # URL: http://beerpla.net # # DATE: 02/21/07 # # ABSTRACT: Removes all ftprush queue items that don't download to localhost. # It is useful to run if you FXP a lot of files back and forth and want # to clean up the queues from time to time, but don't want to delete # anything that is downloading. # Feel free to make a shortcut to this script and run it any time you want. # # Note that this script is only compatible with the ANSI FTPRush version. # The Unicode version is not supported. # # You need to have Activestate Perl installed in order to run this script. # http://www.google.com/search?q=activestate+perl+download use strict; use Data::Dumper; use File::Path; use File::Find; use Cwd; my $ftprush_location = "C:\\Program Files\\FTPRush\\Queue"; # FTPRush queue location sub return_file_list { my @filelist; find( sub { if ( $File::Find::name =~ /rfq$/i ) { push @filelist, $File::Find::name; } }, $ftprush_location ); return @filelist; } foreach(return_file_list()){ open(FILE, $_) or die "Couldn't open $_"; my $file = ; close FILE; if($file =~ /\bLocal\b/){ print "File $_ contains localhost downloads\n"; } else{ print "Deleting $_\n"; unlink or print "$!\n"; } }