<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>beer planet &#187; fxp</title> <atom:link href="http://beerpla.net/tag/fxp/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Fri, 06 Jan 2012 08:50:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>FTPRush Cleanup Script</title><link>http://beerpla.net/2007/10/28/ftprush-cleanup-script/</link> <comments>http://beerpla.net/2007/10/28/ftprush-cleanup-script/#comments</comments> <pubDate>Mon, 29 Oct 2007 00:39:28 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[clean]]></category> <category><![CDATA[ftprush]]></category> <category><![CDATA[fxp]]></category> <category><![CDATA[local]]></category> <category><![CDATA[script]]></category> <guid
isPermaLink="false">http://beerpla.net/2007/10/28/ftprush-cleanup-script/</guid> <description><![CDATA[<p>Removes all ftprush queue items that don&#039;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&#039;t want to delete anything that is downloading. Feel free to make a shortcut to this script and run it any time you want.</p><p>Note that this script is only compatible with the ANSI FTPRush version. The Unicode version is not supported.</p><p>You need to have Activestate Perl installed in order to run this script. <a
href="http://www.google.com/search?q=activestate+perl+download">http://www.google.com/search?q=activestate+perl+download</a></p><p>Script source is available from SVN <a
href="http://beerpla.net/svn/public/Perl/FTPRush.Cleanup/clean_ftprush.pl" target="_blank">here</a>.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></td></tr></table></div><p>...<div
class=clear></div> <a
href="http://beerpla.net/2007/10/28/ftprush-cleanup-script/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>Removes all ftprush queue items that don&#039;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&#039;t want to delete anything that is downloading. Feel free to make a shortcut to this script and run it any time you want.</p><p>Note that this script is only compatible with the ANSI FTPRush version. The Unicode version is not supported.</p><p>You need to have Activestate Perl installed in order to run this script. <a
href="http://www.google.com/search?q=activestate+perl+download">http://www.google.com/search?q=activestate+perl+download</a></p><p>Script source is available from SVN <a
href="http://beerpla.net/svn/public/Perl/FTPRush.Cleanup/clean_ftprush.pl" target="_blank">here</a>.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td
class="code"><pre>#!/usr/bin/perl
#
# AUTHOR:   Artem Russakovskii
#
# 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
&nbsp;
use strict;
use Data::Dumper;
use File::Path;
use File::Find;
use Cwd;
&nbsp;
my $ftprush_location = &quot;C:\\Program Files\\FTPRush\\Queue&quot;; # FTPRush queue location
&nbsp;
sub return_file_list
{
  my @filelist;
  find(
    sub {
      if ( $File::Find::name =~ /rfq$/i )
      {
        push @filelist, $File::Find::name;
      }
    },
    $ftprush_location
  );
&nbsp;
  return @filelist;
}
&nbsp;
foreach(return_file_list()){
  open(FILE, $_) or die &quot;Couldn't open $_&quot;;
  my $file = ;
  close FILE;
&nbsp;
  if($file =~ /\bLocal\b/){
    print &quot;File $_ contains localhost downloads\n&quot;;
  }
  else{
    print &quot;Deleting $_\n&quot;;
    unlink or print &quot;$!\n&quot;;
  }
}</pre></td></tr></table></div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush+Cleanup+Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=FTPRush%20Cleanup%20Script&amp;link=http://beerpla.net/2007/10/28/ftprush-cleanup-script/&amp;notes=Removes%20all%20ftprush%20queue%20items%20that%20don%27t%20download%20to%20localhost.%20It%20is%20useful%20to%20run%20if%20you%20FXP%20a%20lot%20of%20files%20back%20and%20forth%20and%20want%20to%20clean%20up%20the%20queues%20from%20time%20to%20time%2C%20but%20don%27t%20want%20to%20delete%20anything%20that%20is%20downloading.%20Feel%20free%20to%20make%20a%20shortcut%20to%20this%20script%20and%20run%20it%20any%20time%20you&amp;short_link=http://bit.ly/bK9bSq&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/04/08/perl-finding-files-the-fun-and-elegant-way/" rel="bookmark" title="April 8, 2009">[Perl] Finding Files, The Fun And Elegant Way</a></li><li><a
href="http://beerpla.net/2009/03/05/perl-how-to-get-the-path-of-an-included-library-pm-regardless-of-current-directory/" rel="bookmark" title="March 5, 2009">[Perl] How To Get The Path Of An Included Library (.pm), Regardless Of Current Directory</a></li><li><a
href="http://beerpla.net/2008/03/21/quick-snippet-finding-if-a-file-has-a-media-extension-using-regex/" rel="bookmark" title="March 21, 2008">Quick Perl Snippet: Finding If A File Has A Media Extension Using Regex</a></li><li><a
href="http://beerpla.net/2009/12/20/enable-a-twitter-retweet-rt-button-that-lets-you-add-comments-before-retweeting/" rel="bookmark" title="December 20, 2009">Enable A Twitter Retweet (RT) Button That Lets You Add Comments Before Retweeting</a></li><li><a
href="http://beerpla.net/2007/07/09/the-repositories-for-apt-get-in-suse-102/" rel="bookmark" title="July 9, 2007">The Repositories For apt-get In SUSE 10.2</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2007%2F10%2F28%2Fftprush-cleanup-script%2F&amp;title=FTPRush%20Cleanup%20Script" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2007/10/28/ftprush-cleanup-script/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
