Make IFLs in a Pinch

You never know what files you are going to get from customers.  After several phone calls talking through using FTP or shipping a hard drive, confirming compression usage, acceptable file formats there is still the possibility weird naming schemes.

This is example of a schema that came through last week.

c:\data\CustomerX\study01\re-d01_001_0_1.jpg
c:\data\CustomerX\study01\re-d01_001_0_2.jpg
c:\data\CustomerX\study01\re-d01_001_0_3.jpg
c:\data\CustomerX\study01\re-d01_001_0_4.jpg
c:\data\CustomerX\study01\re-d01_001_1_1.jpg
c:\data\CustomerX\study01\re-d01_001_1_2.jpg
c:\data\CustomerX\study01\re-d01_001_1_3.jpg
c:\data\CustomerX\study01\re-d01_001_1_4.jpg
c:\data\CustomerX\study01\re-d01_001_2_1.jpg
……..

I was about to whip out my favorite file renaming software, but I wanted to retain the original names for communication with the customer.  The solution is pretty easy so I thought I’d share it.  There might be a tool that does this already but its good to know how to do this on any machine without any special tool installed.  We’re going to fix this problem with CMD.exe. muahahaha!

What is an IFL?

IFL or “image file list” files are required for any file sequence work in 3ds Max.  Other programs, like After Effects implicitly work with sequences by name.  3ds Max creates IFLs every time you ask to use an image file and it detects a sequence.  This process happens so fast I bet most people click through the dialog without thinking about it. Here is a pic, in case you forgot.

CropperCapture[50]

If you open an IFL you’ll see it just contains text with a file name on each line.  They may have a full path, or a relative path, or just the filename.  Each file can be a completely different name or extension. ( There are other features of this simple format but I can’t seem to find any documentation on the spec.)  So how do we generate this list of files?

Solution

In the long long ago, you had to know some basic shell operations to do anything.  Otherwise you’d be staring at a blinking cursor until someone came over and did it for you.  Change directory, list files, change directory, list files, and then type the name of the program. Happy times! If this typing exercise got in the way of playing your games, you’d learn it real fast too.  And twenty plus years later, this inane knowledge saves the day.  I know command line isn’t for everyone but a few quick tips are worth knowing. Here is how to make the list with cmd.exe

c:\data\CustomerX\study01>dir /b *.jpg > study01.ifl

Easy, right? Let’s break it down.

c:\data\CustomerX\stud01> –this is the current path. If it’s not you’ll have to add this to the arguments of the “dir” command. So if the current path is c:\ and the files are on the network, it would be something like c:\>dir /b \\server\share\data\study01\*.jpg > \\server\share\data\study01\study01.ifl

dir – this is the command to list the contents of the directory/folder (type dir /? for help)

/b — switch to only list the bare name

*.jpg – this is the filter. in this case “all the files with extension jpg”. You could put a path here too. ie.(..\study02\new\test01\*.tiff)

> – the right bracket means redirect output in most command shells. This will send the output to a file instead of the screen.

study01.ifl  – This is the file that will be created.

Not so hard. You can also use /s to recursively list the files in subdirectories.  Now you can use this IFL in Fusion, Max, and many other packages.

Bonus: add a number after the filename. This will hold that frame that duration.

image0001.tif 60
image0002.tif
image0003.tif
image0004.tif
image0005.tif 100

Ben Lipman
Tool Programmer/TD
Anatomical Travelogue R&D

Technorati Tags: ,

One Response

  1. Chad Says:

    I just used this (with the /s) to play the entire contents of a .fuskin file. Very handy.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.