15 Replies Latest reply on Sep 23, 2007 10:40 AM by pixlor

    Batch processing and order by date

    delphs75000
      Hello,

      after a bach processing with Fireworks MX (.png files), i can't find the order of my 30 final files (.gif files). (by date)
      The order is just by name. Then i wonder if it's possible to do it and how.
      Maybe i need a script i don't know
      Thank you.

      delphine
        • 1. Re: Batch processing and order by date
          delphs75000 Level 1
          Anyone ?

          I need this info for a project. That would save me months of work!

          delphine.
          • 2. Batch processing and order by date
            pixlor Level 4
            Unless your batch process was quite complex, it's possible that most of your .png files were processed within a couple of minutes, thus producing .gif files with roughly the same timestamp. The new files are just that - new - and they don't carry over any date information from the files you created them from.

            If you need to have date information in your file names to sort by, rename them to include it. I usually go wtih a yy-mm-dd or yyyy-mm-dd numeric format as a prefix or postfix, depending on what else is in the file name.

            Besides, who knows what order Fireworks processed your .pngs in the first place.
            • 3. Re: Batch processing and order by date
              Level 7
              pixlor wrote:
              > Unless your batch process was quite complex, it's possible that most of your
              > .png files were processed within a couple of minutes, thus producing .gif files
              > with roughly the same timestamp. The new files are just that - new - and
              > they don't carry over any date information from the files you created them
              > from.
              >
              > If you need to have date information in your file names to sort by, rename
              > them to include it. I usually go wtih a yy-mm-dd or yyyy-mm-dd numeric format
              > as a prefix or postfix, depending on what else is in the file name.
              >
              >

              If you've got Bridge, you can sort by date created or date modiefied
              and view the order.

              --
              Jim Babbage - .:Community MX:. & .:Adobe Community Expert:.
              Extending Knowledge, Daily
              http://www.communityMX.com/
              CommunityMX - Free Resources:
              http://www.communitymx.com/free.cfm
              ---
              .:Adobe Community Expert for Fireworks:.
              news://forums.macromedia.com/macromedia.fireworks
              news://forums.macromedia.com/macromedia.dreamweaver
              • 4. Re: Batch processing and order by date
                delphs75000 Level 1
                Thanks a lot for the answers.

                <pixlor
                "The new files are just that - new - and they don't carry over any date information from the files you created them from."

                If i have a .png: "01-01-1900" (not the name of image, but the text "in" the image.)
                I have to create 99 .gif files: "01-01-1901" to "01-01-1999", same from February to December. Then from 16th century to 22th century... (all files in the right order year by year) you can imagine the time i would save if batch processing could work with this right order ! lol
                Is there a script to correct this please ? Because it is very slow, even with shortcuts.

                <Jim Babbage
                Do you think my problem would be corrected with Bridge ?
                I am looking any solution to simplify my work.

                delphine
                • 5. Batch processing and order by date
                  pixlor Level 4
                  quote:

                  Originally posted by: delphs75000
                  If i have a .png: "01-01-1900" (not the name of image, but the text "in" the image.)
                  I have to create 99 .gif files: "01-01-1901" to "01-01-1999", same from February to December. Then from 16th century to 22th century... (all files in the right order year by year) you can imagine the time i would save if batch processing could work with this right order ! lol
                  Is there a script to correct this please ? Because it is very slow, even with shortcuts.

                  Oh! I see! No...the text that is in your image is only a pattern of pixels, and has nothing to do with the file name. But I understand what you need, now. I understand what you're asking. You want to know if there's a script, somewhere, that can generate images based on text input and name the files accordingly. Hmm...I don't know, but lemme go ask on a forum chock full of nice and smart developers. Maybe someone will have an idea. What operating system do you have?

                  That's a lot of images! If you don't mind my asking, why do you want images instead of using text?

                  As for naming the images so you can sort them, I think a good file name for the image with content "01-01-1901" would be 1901-01-01.gif that way, you would sort your years first, then months, then days. Um...do you only need the first day of each month - 12 images per year, 120 images per century?


                  Later...
                  I posted on my other forum and I did a Web search and found these two pages:
                  Create and Image of Text, Add Label to Image
                  ImageMagick
                  It looks like it would work, but doesn't look terribly user-friendly to me.
                  • 6. Re: Batch processing and order by date
                    delphs75000 Level 1
                    Hello pixlor,
                    thank for your interest!

                    "You want to know if there's a script, somewhere, that can generate images based on text input"
                    Yes that's correct! Batch processing seems to be the right answer for me.
                    My system is Windows 2000 pro.

                    "If you don't mind my asking, why do you want images instead of using text?"
                    In fact, i work with flash cards based on .gif images.
                    I would need all days of the months from 1600 to 2100. (included year) (more than 180000 images) with the french date pattern: dd-mm-yy.
                    If some developers could help me, i would be very gratefull to them.

                    Best regards.
                    • 7. Re: Batch processing and order by date
                      pixlor Level 4
                      Flash cards...as in physical cards? If so...what about using Word and mailing labels to stick to the cards? Set up a file for one year, print, then search-replace the year...etc. Still tedious, but perhaps more doable?

                      If you don't mean physical cards...never mind!
                      • 8. Re: Batch processing and order by date
                        delphs75000 Level 1
                        Flash cards but not physical cards. Just .gif images regrouped in less files with an animator software. But first i need the .gif images.
                        With batch processing it's possible but only with an order!
                        Do you know someone who can be interested by building such script please ?

                        Thanks a lot.


                        • 9. Re: Batch processing and order by date
                          pixlor Level 4
                          Okay. Well...here's the thread at my Web host where I posted (I'm Lorraine) http://forums.crystaltech.com/index.php/topic,32392.0.html. There is a classified ads section, too. Great bunch of people, really.

                          ImageMagick will produce what you want. If I were to do it, I'd mess around with the settings until I got the results I wanted with one image, then go to Excel to make a list of all the dates from 1/1/1600 to...er...whenever in column A, then set up a function to produce the commands I needed in column B, copy column B to a .bat file and run it. If any of what I just said isn't familiar jargon, then you'd want to find someone with a higher comfort level at it.


                          Other than that, you could do something like this in Fireworks:
                          Use Excel to make a list of a day of the year for each year in a century: in A1, put 1900; in A2 put =1+A1; copy A2 down through A100. In B1, put ="01-01-"&A1 and copy that down to B100.

                          Copy the text in column B to Fireworks Text Editor (don't just copy or you'll get an image) and set up slices. For example: dates.png. (I've cropped it off at the bottom so Photobucket won't resize it.) I've named the slices for the last two digits of the year. Once you have a graphic like this, in the size you need, with all your slices set up, export to gif. It wont' be very useful, because they'll only have two digit names, but you can rename them.

                          To rename them as dd-mm-yyyy.gif: in Excel, put ="ren "&RIGHT(B1,2)&".gif "&B1&".gif" in C1
                          To rename them as yyyy-mm-dd.gif: in Excel, put ="ren "&RIGHT(B1,2)&".gif "&RIGHT(B1,4)&"-"&MID(B1,4,2)&"-"&LEFT(B1,2)&".gif" in C1
                          Copy B1 through to B100; copy all that to a text file and save as something like rename.bat. You should be able to double-click the file and have it run and rename your files. Then, make a new folder named for the day of the year and move all the renamed files into it. Also, just for security, save the .png and copy it to the new folder.

                          Next, go back to Excel, change the day, copy the text into Fireworks and repeat the export process. You don't have to make new slices or rename them, they'll work just the way they are. You'll need to copy the batch renaming text from Excel to the .bat file however, since you'll have a different day. Export, rename, move...

                          Once you've done all the days for that century, Go back to Excel and change the year in cell A1 Repeat the text-copy, export, and rename process.

                          366 days/year * 6 centuries = 2196 times you'd have to repeat this process, and then you'd want to go back and delete all the Feb 29ths for non-leap years.


                          Crikey.


                          I think you'd probably be better off tackling the ImageMagick method.
                          • 10. Batch processing and order by date
                            John Dunning Level 1
                            quote:

                            Originally posted by: delphs75000
                            I would need all days of the months from 1600 to 2100. (included year) (more than 180000 images) with the french date pattern: dd-mm-yy.



                            Try this command:
                            http://johndunning.com/fireworks/scratch/Export%20Dates.jsf

                            Download the file and put it in: C:\Program Files\Adobe\Adobe Fireworks CS3\Configuration\Commands

                            Create a new document with the canvas size that you want all the date files to have.
                            Give it the right background color, export options, etc.
                            Create a single text element in the document with the text formatting you want the dates to have: color, size, font, etc.
                            Create background images or other stuff, as long as it's behind the text.
                            Run the Export Dates command from the Commands menu.
                            Pick the export directory.

                            The command will then create export every date from 01-01-2007 to 31-12-2007 using the export settings and text formatting you specified. It will create the files in a directory called 2007 inside the export directory you selected in the dialog.

                            If the files look like what you want, then go into the Export Dates.jsf file and change the StartYear and EndYear values on lines 25 and 26. If you really want 500 years of dates, it's going to take awhile for FW to crank through them. I'd probably only do 100 years at a time.

                            Note that leap years aren't handled, so the script *always* exports 29 days for February. You'll need to go in and delete the unnecessary non-leap-year dates manually.
                            • 11. Re: Batch processing and order by date
                              pixlor Level 4
                              quote:

                              Version - 0.1.0
                              Last update - 9/10/2007 1:53 PM


                              I take my hat off to you, sir! This is a most generous work!
                              • 12. Re: Batch processing and order by date
                                delphs75000 Level 1
                                <pixlor,

                                Thanks again for you interest.
                                I didn't know Imagemagic, but i have it on my pc now.
                                A strange program, but very powerfull as i can see.
                                Your method sounds good to me. I wonder if there is a script with Excel to automate the Gregorian calendar.

                                <WhyDoWeNeedNicknames?

                                " http://johndunning.com/fireworks/scratch/Export%20Dates.jsf"
                                The Holy Grail !!
                                I can't believe my eyes...
                                Thank you very much for your contribution. I really appreciate it.
                                The result is 183366 .gif files created in just one hour...
                                You save me some months of work. Now, i just need to fix the answers of dates. Maybe i will find a special algorithm for this.

                                Best Regards.
                                • 13. Re: Batch processing and order by date
                                  John Dunning Level 1
                                  quote:

                                  Originally posted by: delphs75000
                                  The result is 183366 .gif files created in just one hour...



                                  50 GIFs a second? That seems surprisingly fast! Glad it was useful...
                                  • 14. Re: Batch processing and order by date
                                    delphs75000 Level 1
                                    <pixlor,

                                    do you know if "WhyDoWeNeedNicknames?" is Mister Dunning please ? Because he does not answer to my email. :(

                                    Thank you.
                                    • 15. Re: Batch processing and order by date
                                      pixlor Level 4
                                      I don't know for a fact, but my inner Sherlock Holmes tells me it's so: the code was written by Mr. Dunning; it is dated the day before WhyDoWeNeedNicknames posted it (time to test); and it is on Mr. Dunning's Web space.