# Moving files with action

**URL:** https://community.mp3tag.de/t/moving-files-with-action/61474
**Category:** Support
**Created:** [July 5, 2023, 2:21pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474 "2023-07-05T14:21:54Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 2:21pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/1 "2023-07-05T14:21:54Z")

</div>

hi,  
i have existing files that i'm updating and after i update , i like to move them to there respective folders using an action. can this be done and if so what is the string value. also can i move several different files at once with an action string? i'm trying to not do this munually Thank You.

---

<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: [July 5, 2023, 2:35pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/2 "2023-07-05T14:35:42Z")

</div>

You have already asked many similar questions about files and folders.

What exactly have you tried so far?  
As the pinned [Support-Introduction](https://community.mp3tag.de/t/hints-for-asking-support-requests/56190#be-descriptive-also-in-what-youve-already-tried-1) says:

> ## Be descriptive, also in what you’ve already tried
> 
> Please give a short explanation what’s not working as expected or what you’re trying to achieve. It’s best to know any details about the problem at hand and especially, **what steps you’ve already tried** to solve it by yourself. Helpful information also includes the **Mp3tag and Windows version** numbers and **what files types** you're working with. This way it's easier to know where to start helping.

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 4:15pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/3 "2023-07-05T16:15:59Z")

</div>

i have tried several actions  
format value  
\_FILENAME  
`$move E:\1960s\%ARTIST% %year%\%artist% .. %title%`  
also  
\_FILENAME  
`$move E:\1960s%ARTIST% %year%%artist% .. %title%`  
also did this under action replace along with  
action  
format action \_directory (same string type.

i tried these after i looking uo the info on the net using my search as mp3tag.

ask for asking questions it my understanding that there is a help fourm so i use it after i search for myself. if i was a scripter i wouldn't need to ask questions now would i.

---

<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: [July 5, 2023, 4:29pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/4 "2023-07-05T16:29:36Z")

</div>

How exactly should your target directory and filename look like?

Something like this  
`E:\1960s\ABBA\1962\ABBA - Waterloo.mp3`  
(using ARTIST twice and without TRACK and without ALBUM, for example)?

* * *

Where exactly did you find this command

> [@dp19](#):
>
> $move

---

<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: [July 5, 2023, 4:34pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/5 "2023-07-05T16:34:15Z")

</div>

> [@dp19](#):
>
> format value  
> \_FILENAME

There is a chapter in the documentation how to create folder structures from tags:

> **[Rename Files – Mp3tag Documentation](https://docs.mp3tag.de/converters/rename-files/#create-folder-structures-based-on-tags)**
>
> Documentation on Tag to Filename, a converter to rename files based on tags. Mp3tag is the universal Tag Editor.

You found the correct action type.

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 4:56pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/6 "2023-07-05T16:56:59Z")

</div>

> [@LyricsLover](#):
>
> E:\1960s\ABBA\1962\ABBA - Waterloo.mp3

i already have my directiry set as i like them, so i have re-recorded some mp3 and now i'm trying do an action to move the new file to their artist directiry without habing to move one by one by hand.  
the $move was something that i thought may do the trick. like i said i'm no scripter.

---

<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: [July 5, 2023, 5:04pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/7 "2023-07-05T17:04:42Z")

</div>

> [@dp19](#):
>
> the $move was something that i thought may do the trick.

A much better trick would be to have a look at the documentation of the scripting functions:

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

What happens if you apply your format string without the $move - does that have the correct effect?

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 5:21pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/8 "2023-07-05T17:21:12Z")

</div>

renoving $move, $replace has no effect,

---

<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: [July 5, 2023, 5:36pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/9 "2023-07-05T17:36:29Z")

</div>

> [@dp19](#):
>
> replace has no effect,

Where does the $replace come from?  
I can only see

> [@dp19](#):
>
> \_FILENAME  
> `$move E:\1960s\%ARTIST% %year%\%artist% .. %title%`  
> also  
> \_FILENAME  
> `$move E:\1960s%ARTIST% %year%%artist% .. %title%`  
> also did this under action replace along with  
> action  
> format action \_directory (same string type.

I refer to your first attempt:

> [@dp19](#):
>
> format value  
> \_FILENAME  
> `$move E:\1960s\%ARTIST% %year%\%artist% .. %title%`

What happens if you leave out the $move?  
(If it does not work, screenshots would help a lot)

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 5:47pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/10 "2023-07-05T17:47:01Z")

</div>

i have looked at Scripting Functions – Mp3tag Documentation and this where i have try alot of actions by trial and error, so i'm looking at what i'm trying to do has it can't be done through actions.

---

<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: [July 5, 2023, 5:52pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/11 "2023-07-05T17:52:14Z")

</div>

> [@dp19](#):
>
> it can't be done through actions

I ask you again: what happens if you apply an action of the type "Format value" for \_FILENAME with the  
Format string: `E:\1960s\%ARTIST% %year%\%artist% .. %title%`  
(the one that you showed in post #3).  
As that would be an action and it renames the file.

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 6:20pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/12 "2023-07-05T18:20:09Z")

</div>

> [@ohrenkino](#):
>
> E:\1960s%ARTIST% %year%%artist% .. %title%

if i do what you are asking above i get and error stating file already exist. i'm really trying here to learn so i don't bother coming here.

---

<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: [July 5, 2023, 6:23pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/13 "2023-07-05T18:23:35Z")

</div>

> [@dp19](#):
>
> above i get and error stating file already exist

I cannot tell whether the data that you have in the tag fields eventually leads to a name that already exists.  
That is something that only you can determine as you see the data in the tag fields and also can have a look at the target folder.  
What remains: the action renames a file. So it is possible to rename a file with an action and even move it to a new folder.  
All the other environmental conditions like already existing files is something beyond the controle of MP3tag.

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 5, 2023, 6:42pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/14 "2023-07-05T18:42:30Z")

</div>

that i correct the files are there i'm trying to replace them within action and moving them to there folders in one shot. this is my hole point of the thread.

---

<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: [July 5, 2023, 6:54pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/15 "2023-07-05T18:54:45Z")

</div>

So, what you try to avoid is that you get an error message that a file of the same name already exists?  
That won't be successful.  
See e.g. here about renaming files to names that already exist:

> [@Auto Renaming of filenames if duplicated](https://community.mp3tag.de/t/auto-renaming-of-filenames-if-duplicated/9637/):
>
> Hi ! How do I make Mp3 tag to add a number at the end of the FILENAME in the case of duplicated filenames? Example: ABBA-Mamma Mia.mp3 - first copy of the song ABBA-Mamma Mia(2).mp3 - second copy of the song Thanks in advance !!!

---

<div class="post-metadata">

### Author: ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)
#### Post date: [July 5, 2023, 7:23pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/16 "2023-07-05T19:23:27Z")

</div>

With all due respect, a lot of the confusion in this thread comes from dp19's initial post. Let me try to simplify this task. If the destination folders exist and each move will be different, then an action is not a good choice. Instead, simply select the processed files to move to a given folder, right-click on the selection, and choose **Move** from the context menu. Then navigate to the destination folder. Done! If necessary, you can filter the selection by artist name and then move the filter results to the correct folder. If the file already exists Mp3tag will prompt you.

> [@dp19](#):
>
> i already have my directory set as i like them, so i have re-recorded some mp3 and now i'm trying do an action to move the new file to their artist directory without having to move one by one by hand. The $move was something that i thought may do the trick. Like i said i'm no scripter.

The **Move** command is on the Mp3tag right-click menu. Any number of selected files can be moved to a new location with a single operation. I have a feeling that this may be all that you need....

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 6, 2023, 3:54pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/17 "2023-07-06T15:54:31Z")

</div>

@Doug thanks for clearing this up, was hoping an action would be able to do his without moving each file separately. thank everyone for your input learning more daily.

---

<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: [July 6, 2023, 5:03pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/18 "2023-07-06T17:03:44Z")

</div>

Just to get this right: you can move files with an action.  
You can't move files as long as there is an existing file with the same name.

What you can do:  
Instead of using just the plain  
Format string: `E:\1960s\%ARTIST% %year%\%artist% .. %title%`  
use  
Format string: `E:\1960s\%ARTIST% %year%\%artist% .. %title%_111`  
Then you load the target folder and filter for all files that do not have 111 at the end:  
`NOT %_filename% HAS 111`  
Rename these files with Convert\>Tag-Filename and  
Format string: `%_filename%_111`  
which will fail for all those filenames of files that you just moved - which is the intention to find all the files which would now be a duplicate to the new files.  
Refresh the filtered list and you will see all the files where renaming failed.  
These are the files for which you have move a newer file.  
You can now delete these files.  
Finally, if you care, remove the \_111 from the new filenames:  
Convert Tag-Tag for \_FILENAME  
Format string: `$replace(%_filename%,_111,)`

---

<div class="post-metadata">

### Author: ![dp19](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dp19](https://community.mp3tag.de/u/dp19)
#### Post date: [July 6, 2023, 5:22pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/19 "2023-07-06T17:22:13Z")

</div>

ohrenkino , Thanks for the input like Doug said an action can't do a move like i was trying to do, i'm continuing like i have been. this can be close and i'll try not to bother support again but i can't promise that.

---

<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: [November 26, 2023, 4:05pm UTC](https://community.mp3tag.de/t/moving-files-with-action/61474/20 "2023-11-26T16:05:22Z")

</div>

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