Multiple files using export


#1

Nevermind. I was able to achieve the results I needed by specifying %_directory% in the "Export File Name:" dialog box.

Hi all,

Just a quick question on exporting.

I have hundreds of directorys that I need to gather info on but I would like one file per directory containing only what is in that directory and I would like to name each text file the same as the directory name.

Here is what I'm using right now and it creates one text file with all the info I need. But as I said I would like individual text files for each directory.

%_directory%
$loop(%_path%)%track%|%title%
$loopend()

Thanks in advance.

Michael


#2

Just to add this, you can also define the filename in the config:

$filename(%_folderpath%%_directory%.txt,ansi)%_directory%
$loop(%_path%)%track%|%title%
$loopend()


#3

This works, thanks. However, when I have the %filename command inserted it adds an extra line of space at the top of the file. I checked my config file and I didn't have any stray returns anywhere so I'm not sure why I'm getting the extra line.

Also, in some outputs the track listing is not sorted. Some times is comes out as:

1|track_1
10_track_10
2|track_2

But other times it sorts correctly as:

1|track_1
2|track_2
...
10|track_10

Any ideas on why it would do this? Below is my script.

$filename(%_folderpath%%_directory%.txt,UTF-8)%_directory%
$loop(%_path%)%track%|%title%
$loopend()

Thanks
Michael