Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Quick Question about batching files

by tmharish (Friar)
on Feb 07, 2013 at 11:49 UTC ( #1017626=note: print w/replies, xml ) Need Help??

in reply to Quick Question about batching files

perl script which search a sub folders

And then you say...

creates a folder called Batch1 which ...

Do you want to read files or write them?

Or do you want to do both? If so, the folders you are reading from - what do they look like? Also which OS ( just in case find . works for you )?

Batch1 which has 250 files in there, then Batch2 which has 251 ...

Batch1 contains 250 files and Batch2 has 251 files or do you want to store files 251 to 500 in it?

Also see How do I post a question effectively?

Replies are listed 'Best First'.
Re^2: Quick Question about batching files
by Boxerman (Initiate) on Feb 07, 2013 at 12:53 UTC
    All thanks for your responses and help.

    In regards to reading the file, i dont want that, i just want a count of files and sort them in to the folders until there are no more files left.

      ...sort them in to the folders...

      Sort by which criteria? Name? Contents?

      This is probably the main point that makes the question difficult to answer ... and maybe why some answers may seem rude or vague.

        Sorting may be harder, but that did not prevent choroba from mentioning e.g. opendir and File::Copy in the very first post in this thread. Given how most shell commands, etc. sort the contents of directory listings, he may not even realize it is something he will likely have to deal with! Or alternatively, he may have a handle on the sorting part. Sorting is fairly common and Perl does have a built-in function for it after all. On the other hand, array splicing, traversing directories, etc. could be another matter entirely. It's not even clear to me that sorting is part of the question.

        Elda Taluta; Sarks Sark; Ark Arks
        My deviantART gallery

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017626]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-06-24 21:02 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.