# Move music file one level up (from directory to parent\_directory)

**URL:** https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319
**Category:** Support
**Created:** [January 4, 2024, 11:13pm UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319 "2024-01-04T23:13:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![danielstoica](https://community.mp3tag.de/user_avatar/community.mp3tag.de/danielstoica/32/15796_2.png) [@danielstoica](https://community.mp3tag.de/u/danielstoica)
#### Post date: [January 4, 2024, 11:13pm UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319/1 "2024-01-04T23:13:14Z")

</div>

Hello! I need again some help here.

I need to move some music files which are in dedicated CD01, CD02, etc folder one level up (into de \_parent \_directory).

Folder structure it's something like this:  
C:\Users\stoic\OneDrive\Desktop\Audio\2Pac\2Pac - All Eyez on Me [2004]\CD01\Song.flac

Should become:  
C:\Users\stoic\OneDrive\Desktop\Audio\2Pac\2Pac - All Eyez on Me [2004]\Song.flac

Keep in mind that "C:\Users\stoic\OneDrive\Desktop\Audio" could change.  
And I need this done by an action not tag to filename (because it will be added into a sequence of actions..)

Thank you!!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 5, 2024, 6:59am UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319/2 "2024-01-05T06:59:48Z")

</div>

Try an action of the type "Format value" for \_FILENAME  
Format string: `..\%_filename%`

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 5, 2024, 7:48am UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319/3 "2024-01-05T07:48:55Z")

</div>

Please be aware that if you move

> [@danielstoica](#):
>
> C:\Users\stoic\OneDrive\Desktop\Audio\2Pac\2Pac - All Eyez on Me [2004]\CD01\Song.flac  
> C:\Users\stoic\OneDrive\Desktop\Audio\2Pac\2Pac - All Eyez on Me [2004]\CD02\Song.flac

to the same "one level up" folder  
`C:\Users\stoic\OneDrive\Desktop\Audio\2Pac\2Pac - All Eyez on Me [2004]`  
you will overwrite one of your tracks `Song.flac`, because you can not have the same file twice with the same name in the same directory.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [January 5, 2024, 6:45pm UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319/4 "2024-01-05T18:45:55Z")

</div>

Agreed.

If you are going to do this, you should consider renaming the files to also include the disc number and track number. Something like `%discnumber%-%track%. %title%` helps keep the filenames unique per folder.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 4, 2024, 6:46pm UTC](https://community.mp3tag.de/t/move-music-file-one-level-up-from-directory-to-parent-directory/63319/5 "2024-02-04T18:46:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
