# \[X\] Filename-Filename failure on grandparent folder

**URL:** https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378
**Category:** No Bugs
**Created:** [March 4, 2008, 9:45am UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378 "2008-03-04T09:45:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 4, 2008, 9:45am UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/1 "2008-03-04T09:45:04Z")

</div>

Convert | Filename - Filename can give the wrong result, e.g.

Old filename pattern: %1\%2\%3  
New filename pattern: %1\%2\%3

should give

"S:\TINDT ctango\02480002922629\1\1.wma" -\>  
"S:\TINDT ctango\02480002922629\1\1.wma"

but instead gives

"S:\TINDT ctango\02480002922629\1\1.wma" -\>  
"S:\TINDT ctango\02480002922629\02480002103028\1\1.wma"

i.e. duplicates %1.

%1\%2 does not suffer from this.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 4, 2008, 7:59pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/2 "2008-03-04T19:59:06Z")

</div>

I don't see the problem.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 4, 2008, 8:05pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/3 "2008-03-04T20:05:03Z")

</div>

The problem is that the operation gives an incorrect result. It duplicates the %1 part of the filename.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 4, 2008, 8:12pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/4 "2008-03-04T20:12:05Z")

</div>

I don't think so.

The old file name pattern %1\%2\%3 in your example results in  
%1 02480002922629  
%2 1  
%3 1.wma

Since the file name is always specified after the last directory separator \ the new file name will be 1.wma. But you also told Mp3tag to move this file into a directory structure %1\%2\ which is 02480002922629\1\ after replacing the placeholders.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 4, 2008, 9:15pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/5 "2008-03-04T21:15:23Z")

</div>

> you also told Mp3tag to move this file into a directory structure %1\%2\   
> which is 02480002922629\1\ after replacing the placeholders.

Sure, but I expected that directory structure to be at the position I specified in Old filename pattern. I.e. the new pattern is supposed to replace the old i.e. at the same position.

Experimenting more, I find that operation ignores the position of the old filename pattern, and uses instead the current directory. This looks like a fault to me. Certainly it is undesirable behaviour e.g. it makes it impossible swap %1 and %3 in this case.

Florian, I woinder if this is related to the V2.39-\>V2.40 change of behaviour reported in [Bug Or New Feature ?](https://community.mp3tag.de/t/6277/3) .

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [March 4, 2008, 9:28pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/6 "2008-03-04T21:28:41Z")

</div>

It's not the way it works 😉

1. It's used to rename files, not directories
2. As a bonus feature it can be used to create new directories (using path separators in the new file name)
3. Using the current directory is not a fault but desired behaviour.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 4, 2008, 10:01pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/7 "2008-03-04T22:01:24Z")

</div>

> It's not the way it works 😉

We sure agree on that! 😉

> Using the current directory is not a fault but desired behaviour.

Well, it is currently /undefined/ behaviour, so I REALLY think it ought to be mentioned in the Help. It is no fun at all to find out the hard way that that same Converter input can give totally different results another day just because the files were loaded in a different way, or because Add Directory was used, putting a completely inappropriate current directory on the previous files.

Thanks for your time, Florian.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:22pm UTC](https://community.mp3tag.de/t/x-filename-filename-failure-on-grandparent-folder/6378/8 "2018-12-28T14:22:34Z")

</div>

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