The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 mvre 0.31 - MoVe files based on given Regular Expressions
Author: parv 
Date:   23-11-03 01:40

mvre http://www103.pair.com/parv/comp/src/perl/mvre
is a Perl program (written for versions >=5.6, but could be easily modified, i
hope, to accomodate 5.005_3) to move files based on Perl regular expressions.
Please see
http://www103.pair.com/parv/comp/src/perl/mvre.pod:
short description is...


In default mode, mvre moves file located in the current directory,
matching (Perl) regex, to directory specified by -out-dir. An output
directory is required in all cases. See -out-dir and -out-find-path
options.

Files to be moved, also referred as "input files", are specified either
via -in-select option and/or as argument(s) given after all the options.

Order of input selection regex, *-in-select* or *-select* option, and
output directory specified is important. One-to-one relation exists
between each regex to select input files and the output directory,
either explicitly specified or found in path specified via
*-out-file-path* option.


It requires my own Parv::Util
http://www103.pair.com/parv/comp/src/perl/modules/Parv/Util.pm
module, besides following standard/ordinary modules...

Pod::Usage
File::Copy
File::Find
Getopt::Long


Reply To This Message
 
 Re: Phorum syntax
Author: parv 
Date:   23-11-03 01:44

Oops. Dan, what HTML tags are allowed for this forum?

If you wish, you could delete this thread & i will repost w/o the markup.

Reply To This Message
 
 Re: Phorum syntax
Author: Dan 
Date:   23-11-03 04:37

None really. Surround links with < and >.

--
Webmaster

Reply To This Message
 
 Re: mvre 0.31 - MoVe files based on given Regular Expressions
Author: parv 
Date:   23-11-03 23:26

Thanks for cleaning my post, Dan.

At the time of posting, i forgot that i was not on PerlMonks anymore...

Reply To This Message
 
 Re: mvre 0.31 - MoVe files based on given Regular Expressions
Author: parv 
Date:   06-12-03 05:28

Anybody who does not have version 0.41, please get one. It fixes the not-properly-taking-care-of-existing-files
bug.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org