Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > concatenate files recursively in win32

Reply
Thread Tools

concatenate files recursively in win32

 
 
Mike James
Guest
Posts: n/a
 
      09-19-2003
I admit it. I'm a newbie...

I want to concatenate a series of text files by recursively going down a
folder hierarchy. All the files have the same extension (*.txt) and I'm
running WinXP Home with ActiveState Perl v5.6.1

Any help will be much appreciated.

regards, Mike
 
Reply With Quote
 
 
 
 
Jim Gibson
Guest
Posts: n/a
 
      09-19-2003
In article <Xns93FAE89686959maentigejmsethnnt@206.127.4.25> , Mike James
<(E-Mail Removed)> wrote:

> I admit it. I'm a newbie...
>
> I want to concatenate a series of text files by recursively going down a
> folder hierarchy. All the files have the same extension (*.txt) and I'm
> running WinXP Home with ActiveState Perl v5.6.1
>
> Any help will be much appreciated.
>
> regards, Mike


Check out the module File::Find (I have not used it, but it should
enable you to do what you want.) If you don't have that, or can't
figure out how to use it (it uses subroution references, which can make
it complicated for a beginner), then check out the opendir, readdir,
and closedir functions, and file test operators.

If you have perldoc installed:

perldoc File::Find
perldoc -f opendir
perldoc -f readdir
perldoc perlfunc <- search for "file test" or "Alphabetical
Listing of Perl Functions"


FYI: this newsgroup is defunct. Try comp.land.perl.misc in the future.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate/De-Concatenate Carlos VHDL 10 10-24-2012 01:04 PM
concatenate a set of files eggie5 Ruby 10 09-26-2007 11:13 AM
concatenate several xml files into one big xml/html file? idiotprogrammer XML 4 03-05-2007 06:43 PM
How to concatenate 'like' files in a dir? wilson_work@yahoo.com Perl Misc 7 02-20-2006 03:54 PM
Need to concatenate all files in a dir together into one file and read the first 225 characters from each file into another file. Tony Perl Misc 5 04-19-2004 03:28 PM



Advertisments