Program that batch counts different files automatically?

I'm looking for a program that could automatically list a count of files containing different codes.

I have a scanning service. Basically I put two letter codes into files created for customers and tally the totals of each type at the end of the order to determine their $ balance. Slides and negatives are charged differently from prints. Framed pictures are charged differently from loose prints. They are not always in separate folders.

So I need a program that can automatically search files for keywords and give me a quick tally of each item type and list any others that were not counted (didn't have any codes).

Any ideas for a program that could do this or do I need a custom solution?
12 answers Last reply
More about program batch counts files automatically
  1. How are the files tagged with the codes? Is it a file attribute that you set or are these text files containing plain text? In either case a .vbs script sounds plenty sufficient to give you an output of counts. I don't suppose you could use the search utility to look for these, you write down total found for your total and do quick subtraction from total files to tallied files for your "not tagged" number eh?
  2. What type of file are you working with? It wouldn't be possible for you to send me a sample of one of your files would it? If so, PM me your email and I'll see if I can help you figure something out.
  3. first, thanks for the responses.


    LastName-NEGHR-00001.jpg (negatives high res)
    LastName-HS600-00001.jpg (loose prints 600DPI)
    LastName-SL2400-00001.jpg (slides 2400DPI)
    LastName-FB600-00001/jpg (flatbed 600DPI)

    So I'd basically be searching all folders and subfolders for NEGHR, HS600, SL2400 to get a tally of each. And also a tally of any files not counted (.jpg NOT HS600 NOT SL2400 etc). It's part of the filename, not in the metadata.

    I usually just search files keyword by keyword to get a count, but it would be a lot easier if I could have preset searches and just run it on any folder for all the quantities.
  4. What are all the codes that you have in the file names? Right now I have an ugly looking program that will scan a designated directory and sub directories and report back the information that you have mentioned (total files, quantities of each type and uncounted files).

    If you have more codes you search for, then I can get them in and you can try it out. Right now it just displays all of the information on a windows form.
  5. wow, you're amazing! i'll get those codes together and post soon. didn't expect you to do that for me.
  6. Well I work with VB on an amateur level because it interests me. I'm helping you out for 2 reasons:

    1) Because that is why I visit the few forums that I do, to help where I can. Mostly because I have gotten some good help from forums and I like to give back where I can.
    2) Your situation offers some new stuff for me to learn, so it's a challenge. You never know when I can re-use the down the road.

    I'll PM you my proof of concept. It's only setup to search the codes that you provided in your previous posts. When you give me the others, I'll add them. I'll also make it look a little prettier!
  7. Must not have been that important after all...
  8. dmroeder,

    i should have replied sooner :??: actually it is important but i've been too caught up in work. it may not be massively urgent, but your work would be super useful. yes, it's 2am and i'm putting together a slideshow. too many deadlines, and i didn't know how to answer you on the spot appropriately. the thing is i kind of need to be able to change the keywords at some point and so if those are locked into the code, that might not be as useful unless i'm sure i'm sticking with the existing keywords. i didn't want to say that and make you spend more time. but certainly if this is good practice for you, i would certainly appreciate it. and i'll be more prompt in replying.

    see long-term, i might prefer to use HR for high res rather than the actual resolution since i'll sometimes increase the resolution for the same price (like for a really tiny picture) but putting 600 in the filename might be misleading if it's really a different resolution. let's just use the following keywords for the sake of testing things out and not wasting time. i don't know how much extra work it is to have some interface where the user can actually choose a keyword and save that to the preset group. and then is it also searching hidden files?

    tentatively, say i went with the following...

    SLHR (35mm Slides - High Res)
    SLSR (35mm Slides - Standard Res)

    PHR (Loose Prints - High Res)
    PSR (Loose Prints - Standard Res)

    FBHR (Flatbed - High Res)
    FBSR (Flatbed - Standard Res)

    FBLH (Large Flatbed - High Res)
    FBLS (Large Flatbed - Standard Res)

    NEGHR (Negatives - High Res)
    NEGSR (Negatives - Standard Res)

    MFHR (Medium Format - High Res)
    MFSR (Medium Format - Standard Res)

    i thought yesterday an alternative solution, though not quite as good, would be simply to save my searches in Windows 7 that would potentially save time typing the queries repeatedly. but it turns out saving a search simply repeats the search in the same location. if i navigate to a new directory in Win7, and run the saved keyword search, it just searches the original directory which is a bit pointless. i tried to do more research to see if a new program is necessary, but i can't seem to find any way easily with existing tools. so thank you for your help.
  9. I'm headed to work this morning, I'll add those in tonight.

    To make this more flexible down the road I might just have you put all of these keywords in a text file (with a certain structure) then spit a report out in another text file. That way you could search for whatever you want whenever you want. I'm thinking that I could leave a place for you to add the price in as well and have it give you the total cost if you want. It wouldn't be much extra work.

    Did you get the PM that I sent you? People have sent me ones in the past and I don't notice them for a while.
  10. So I have something working that is configurable. Basically I copied your keywords as is and put them in a text file with a couple of exceptions. I removed all the carriage returns and I put a ":" immediately after your keyword. I grab the keyword and use the rest as information in a report back. I arbitrarily picked a maximum of 100 keywords (it can be more if you like).

    I just have to work our a couple of quirks with total counted files and total un-counted files (files that didn't match the keywords). I'll let you give it a whirl when I work that out (probably tomorrow) and if you like it, I'll make it look prettier. Hopefully it helps you out, it's been entertaining for me to tinker with at least!
  11. This all sounds good. I saw your PM yesterday and will check out your work hopefully Saturday night.

    A few thoughts:

    1) does your program avoid hidden files? one of my editing programs creates hidden folders containing the original, unedited files. We have to make sure those are not counted so there's no double-counting.

    2) as far as the "uncounted files," it is probably more important for me to know WHAT those files are than HOW MANY there are. so rather than output a total number for those not containing an existing KEYWORD, outputting a list of uncounted files with their full paths would be great.

    3) I wouldn't need a spot to enter price since that's calculated already in Quickbooks where I record the invoices and already have all the pricing set up. I just need the total number so i could stick it in Quickbooks. On the other hand, it might be nice to have a running total so at any point during a project I could tell a customer where they're at in terms of cost. most people don't count their pics before bringing them in. so that could definitely be good, though not necessarily a priority. but good thinking!
  12. 1) Probably, I'll check this
    2) I could do this.
    3) I'll try to make it so that if there is a price, it will total it, if not then it will ignore it.

    When I get it updated, I'll let you know and you will use the same link that I sent you in the PM
Ask a new question

Read More

Programming Tally Apps Product