Generating lists of files for Merge
Suppose you have a bunch of image files, all in one folder, that you want to merge into a template presentation.
Your data file looks like this:
but you need a way to get the names of your image files into the data file. Without typing them all by hand, that is. Here's what you do:
First, generate a plain text file that contains your filenames:
- Open a command prompt (choose Start, Run; type "CMD.EXE" and click OK)
- Navigate to the folder where your image files are stored. They should be in the same folder as the template file for this exercise.
- Type: "dir /b *.jpg > temp.txt" (don't type the quote marks, and change .jpg to whatever other file type you're using). Press Enter.
This creates a file called temp.txt; the file will contain a list of all the JPG files in your folder.
Now we'll import the list into Excel:
- Start Excel
- Choose File, Open
- In "Files of Type" choose Text
- Browse to the folder where your pictures are stored and choose temp.txt (the file you just created)
- Excel will want to ask a bunch of questions about the file's format; ignore it and just click Finish.
- You'll see a list of files in column A.
Finally we'll change the vertical list to a horizontal one to make Merge happy:
- Select all of the cells in column A that contain filenames
- Choose Edit, Copy from the main menu bar
- Put the cursor in a blank cell below the file list and choose Edit, Paste Special. Put a check next to "Transpose" then click OK.
- You now have your list of files horizontally laid out.
- Copy from there into your data file beneath the first line with all the "PIC:xxx" stuff and save.
Now your data file should look something like this:
Merge away!
[Previous] [Home] [Next]