473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Sequential file numbering...

cjl
Hey all:

Slightly off topic...

If I have a series of images that I want to convert to an animated gif
using the command line tool 'convert' from imagemagick, they cannot be
named:

1
2
3
4
5
6
7
8
9
10
11
Because this is seen as:

1
10
11
2
3
4
5
6
7
8
9

So I am trying to write a PHP script that will sequentially convert and
number a series of images, and I won't know ahead of time how many will
be in a given sequence. This files are originally randomly numbered,
but the sequence information can be extracted, and their order
determined. I then want to rename them, and I'm thinking I should use:

01
02
03
04
05
06
07
08
09
10
11

This works, and I guess I'll just need to tally the number of images,
and figure out if the 'lefthand' zeroes should be taken to the hundreds
and thousands place.

Anyone else know a simpler way around this problem?

-cjl

Jul 17 '05 #1
1 1540
"cjl" <cj****@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hey all:

Slightly off topic...

If I have a series of images that I want to convert to an animated gif
using the command line tool 'convert' from imagemagick, they cannot be
named:

1
2
3
4
5
6
7
8
9
10
11
Because this is seen as:

1
10
11
2
3
4
5
6
7
8
9

So I am trying to write a PHP script that will sequentially convert and
number a series of images, and I won't know ahead of time how many will
be in a given sequence. This files are originally randomly numbered,
but the sequence information can be extracted, and their order
determined. I then want to rename them, and I'm thinking I should use:

01
02
03
04
05
06
07
08
09
10
11

This works, and I guess I'll just need to tally the number of images,
and figure out if the 'lefthand' zeroes should be taken to the hundreds
and thousands place.

Anyone else know a simpler way around this problem?

-cjl


Use natcasesort() to sort the list.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Kilroy | last post by:
Greetings, I've been working on a project for my church for a couple of weeks. We're going to be selling tickets to our events and we need to look for available seats in our hall. I have a...
9
by: Aguilar, James | last post by:
I know that one can define an essentially unlimited number of classes in a file. And one can declare just as many in a header file. However, the question I have is, should I? Suppose that, to...
0
by: Lynn | last post by:
I have a query which shows start date and the last 4 digits of a person's SSN. I need sequential numbering of an assending start date yet desending last 4 digits of SSN (L4SSN). Using: RowNum:...
4
by: cliff williams | last post by:
how can I set a form so that when i open it , it appears with the next sequential number. I want to set the number pattern and not use autonumber
4
by: James | last post by:
Hello there, Does anyone know how to create a sequential record number field in a query?? Thanks, James
14
by: amywolfie | last post by:
Hi All: I know this is simple, but I just can't seem to get there: I need to sort a table by a text field (txtDescription), then assign sequential numbers to the field SEQUENCE in table. ...
1
by: S. van Beek | last post by:
Dear reader, Is there a function to use in a query for numbering the records starting with one (1) and then second (2) and so on? Thanks for any help
0
by: palmorek | last post by:
I am trying to build a macro in Excel for the purpose of authorizing checks. I am trying to figure out when the user is done entering their information they hit an enter button and the macro will...
11
by: Timofmars | last post by:
I'm try to Unload DB2 data from a table into a record sequential file on NT. I can an unload on Mainframe, but it doesn't seem to be an option in NT. In NT, all I can do is export/import. I can...
1
by: wbw | last post by:
I have a database of products in which I have determined when the product sold. The table has two fields ITEM and SOLD. Each product’s first selling date may be different and may not have sold in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.