# Printing each matching subdirectory

**URL:** https://community.mp3tag.de/t/printing-each-matching-subdirectory/9572
**Category:** Export
**Created:** [December 23, 2009, 10:36am UTC](https://community.mp3tag.de/t/printing-each-matching-subdirectory/9572 "2009-12-23T10:36:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aslewofmice](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/47e85d/32.png) [@aslewofmice](https://community.mp3tag.de/u/aslewofmice)
#### Post date: [December 23, 2009, 10:36am UTC](https://community.mp3tag.de/t/printing-each-matching-subdirectory/9572/1 "2009-12-23T10:36:45Z")

</div>

I've managed to come up with the export format that I'd like to use to aid me in deleting this dupes. My folder structure is:  
/New Music/  
/Archived/  
/Tagged/

And this my export script:

```
$filename(albums-only.csv)
$loop(%album%,1)%album%,%artist%,%_folderpath%,%_bitrate%,%_total_size%,%_total_files%
$loopend()

```

As is, it currently prints each album and the corresponding data correctly. But if the %album% tag finds an exact match, it will sum up the %\_file\_size% and %\_total\_size% and only give one %\_folderpath%.

I would like this script to print each %\_folderpath% and the corresponding data for each folder, regardless if it matches another album.

Ideally my goal is to run through this list and delete the lower quality dupe. Any help would be much appreciated! Thanks

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 23, 2009, 1:02pm UTC](https://community.mp3tag.de/t/printing-each-matching-subdirectory/9572/2 "2009-12-23T13:02:50Z")

</div>

> [@aslewofmice](#):
>
> ... I would like this script to print each %\_folderpath% and the corresponding data for each folder, regardless if it matches another album. ...

I assume that you can reach your goal by changing the loop control expression to ...  
$loop(%album%%\_folderpath%,1)

DD.20091223.1502.CET
