Feature request: Copy Directory Structure

Current Functionality
Currently, when a user right-clicks a selection in the file list and uses the "Copy..." function, all selected files are copied to one destination folder.

Desired Functionality
A very useful feature would be "Copy Directory Structure...", which copies all selected files and duplicates their existing directory structure.

(Ex: Selected songs currently in folders "Artist A", "Artist B", and "Band C" are copied to the destination directory inside same-named folders.)

There are more complicated ways to script the same outcome, but "Copy" is quite a fundamental Mp3tag feature and when copying, many people likely desire to copy the directory structure instead of forcing all copies into one folder.

If your present folder structure is based on tag data, the you can easily distribute the copied files into folders that follow the tag data.
Also, if the folder structure is a special one, you could still copy the important part of it to a user-defined field and then rename the copied files, once they appear in the accumulating target folder.

I see a problem: where does the folder structure start? WIth the current directory? With the parent folder? The whole path minus the drive letter?

Admittedly, it requires extra steps to reconstruct a folder structure with tag data. But it also means: until the function is implemented, there are easy steps to reach the same result.

@ohrenkino Thank you for the valuable insight and ideas. These approaches can definitely help.

Blockquote I see a problem: where does the folder structure start? WIth the current directory? With the parent folder? The whole path minus the drive letter?

Usually the file list in the main UI window represents a selected directory and (optionally) its subdirectories. For any selected files, the copied folder structure would start with the lowest-common directory which contains all the selected folder/files.


Let's say that the selected directory for the list view is:

The Mp3tag UI list shows thousands of files. The user has selected 4 files:
C:\Users\Orenkino\Music\Jazz\Modern\Arturo Diaz\Sueños\What A Wonderful Night.mp3
C:\Users\Orenkino\Music\Jazz\Modern\Mark Heimermann\Studies\Disc 4\Keys in D.wav
C:\Users\Orenkino\Music\Jazz\Modern\Jimmy Abegg\Isaiah 60.mp3
C:\Users\Orenkino\Music\Jazz\Modern\Tonéx\DVD\Out The Box\Samples\Why (live).mp4

Using the proposed "Copy Directory Structure..." feature, the user chooses to copy the above selected files to:

In this case, Mp3tag resolves the lowest-common directory as:

...and therefore copies the files to:
C:\Users\Orenkino\Desktop\project\Arturo Diaz\Sueños\What A Wonderful Night.mp3
C:\Users\Orenkino\Desktop\project\Mark Heimermann\Studies\Disc 4\Keys in D.wav
C:\Users\Orenkino\Desktop\project\Jimmy Abegg\Isaiah 60.mp3
C:\Users\Orenkino\Desktop\project\Tonéx\DVD\Out The Box\Samples\Why (live).mp4

TBH - I think that the new feature would then only cater for one special way of organizing files.
And this structure needs the current directory and the parent folder.
If this were the only way to copy files with respect to the folder structure, then it would not be usable for my collection of samplers which has only the sampler album name as folder level, the same applies to soundtracks (in my case).
It would also not work for users who use the GENRE as grouping criterium.
And I don't know how classical music is organized: by composer, then by artist, then by album?
And all of this does not take multi-disc albums into consideration that have extra folders for each shipping medium.
In the end you would have to set how many levels up you want to include. Does this really make it easier than just to copy all the files into 1 folder and then run an action of the type "Format value" for _FILENAME which includes the target folder names?

Thank you, @ohrenkino

I think this would actually support both your collection of samplers and anyone organizing by GENRE or organizing classical music. However the user's folders are organized, it is proposed that the lowest-common folder (whether broad category or artist name or genre or album name or anything else) is what would be used as the new root. It would work quite elegantly for most situations, because many users have things organized their way within a common lower folder.

There is some merit to this request, for example when copying a group of files or even an entire directory of music files to an external drive or USB key, say for use in a mobile device or car system.

I have used the copy function to do this, but because it becomes a flattened list, there are often duplicate file names that require further user interaction to complete the copy process. Once the list has been copied, a second action must then be run from mp3tag to rename the folders/files using the tag details. But if this could be handled directly during the initial copy function, it could reduce the chance for duplication errors and certainly eliminates that extra lengthy step.

1 Like

The best choice for any file operations is Total Commander, in my opinion.

@incifinci excellent note.

Several tools in the file manager category (XYplorer, Xenon, FileBoss) including the one you mention definitely offer a wide range of useful file operations functions.

The request for a new Mp3tag feature is made here because oftentimes a selection of files can be the result of complex filtering that is most conveniently performed in Mp3tag. (Since Mp3tag has unique audio-tag-focused features, it's very simple to apply complex filters based upon those specific audio-related parameters.) File manager utilities can often achieve the same results in the end, but they are often not as straightforward for filtering/selecting audio files based on a variety of tags and other audio file aspects as Mp3tag is.

This feature request is also made because the current "Copy..." feature often gives users undesired results as-is: namely, by copying all selected files into a single destination directory location. This makes the resultant (re)organization of these files more complex for many users by requiring additional steps to recreate the original folder structure. If such a "Copy..." feature is to exist, the option to copy with directory structure makes the "Copy..." feature more useful to a wider range of users.

1 Like

Ohh! I understood you.

I mostly use file operations for one purpose only, for copying to mp3-player. For that, i use foobar, autoplaylist, then saved "Copy" operation. And you can even use Mp3tag's filters, if they are made. Make a permanent "folder" in the foobar, and drag the filtered Mp3 files there.

Foobar Copy preserves the directory structure.

Yep. Would also love to be able to do this natively in Mp3tag without external tools if possible. :slight_smile:

1 Like

Just another thought, nothing more. I came to the following conclusions a long time ago. Foobar and Mp3tag both are among the greatest creations. But there are thousands of users' demands. Instead of waiting in vain, i prefer to adapt myself: i divide most of my tasks between the possibilities of the "Musical Trinity" Mp3tag+foobar+Total Commander. If the mountain will not come to Mohammed, Mohammed will go to the mountain. :smiley:

But yes: if you need often the desired feature, i can understand your request.

1 Like