473,237 Members | 1,067 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,237 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 1534
"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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.