Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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?


Comment on Re: Quick Question about batching files
Download Code
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.

    Thanks
    B-man
      ...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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017626]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-12-26 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls