[Israel.pm] Directory Browsing

Georges EL OJAIMI g-ojaimi at cyberia.net.lb
Sun Aug 1 03:10:11 PDT 2004


Hello,

I have a big folder with non ending subfolders and fragmented files.
I want first to browse to the end to these subfolders and append the
content of the files into one file per parent directory.

# Original Structure
/rootDirectory
    /Folder1
        /subFolder1
            File1.1.txt
            File1.1.2.txt
        /subFolder2
            File1.2.txt
            File1.2.2.txt
            File1.2.3.txt
    /Folder2
        /subFolder1
            File2.1.txt
            File2.1.2.txt
            File2.1.3.txt
        /subFolder2
            File2.2.txt
            File2.2.2.txt
etc...

# Desired Output
/rootDirectory
    /Folder1
        myFile1.txt (containing File1.1.txt until File1.n.txt)
    /Folder2
        myFile2.txt (containing File2.1.txt until File2.n.txt)

Is there any way and fast way (no memory processing) to do it while the
size of the rootDirectory might reach the 1 GB and the process is
repeated each day?

Best Regards,
Georges





More information about the Perl mailing list