# Autorename doesn't work as expected when files get moved

**URL:** https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994
**Category:** Help & Support
**Created:** [September 26, 2018, 7:58pm UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994 "2018-09-26T19:58:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)
#### Post date: [September 26, 2018, 7:58pm UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/1 "2018-09-26T19:58:16Z")

</div>

Let's take a Rename command that moves files, here: move files up one folder level.

```
Rename FROM * TO ..\* RECURSE AUTORENAME 

```

or, if you prefer a Preset:

```
<?xml version="1.0" encoding="UTF-8"?>
<rename_preset autorename="yes" case="none" ignoreext="yes" recurse="yes" type="normal" version="12">
    <from>*</from>
    <to>..\*</to>
</rename_preset>

```

Let's assume we have a simple folder structure:

```
Folder1
    FileA.txt
Folder2
    FileB.txt

```

After the Rename it will look like this:

```
Folder1
Folder2
FileA.txt
FileB.txt

```

Now let's assume the two files have identical names:

```
Folder1
    File.txt
Folder2
    File.txt

```

Then I would expect the `AUTORENAME` to kick in and rename one file like this:

```
Folder1
Folder2
File.txt
File (1).txt

```

However, the Rename just moves one file:

```
Folder1
Folder2
    File.txt
File.txt

```

How do I get the Autorename to work as expected?

Tested on 12.9 and 12.9.4

[TestAutoRename.orp](https://resource.dopus.com/uploads/default/original/3X/8/1/819ee03c3e2fef3fcbd1e7284185ad01d67ed9c3.orp) (197 Bytes)

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [September 27, 2018, 1:50am UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/2 "2018-09-27T01:50:37Z")

</div>

This will probably do the same thing better:

```nohighlight
Copy MOVE * TO .. WHENEXISTS=rename

```

---

<div class="post-metadata">

### Author: ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)
#### Post date: [September 27, 2018, 4:44am UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/3 "2018-09-27T04:44:27Z")

</div>

That was a demo, not what I wanted to do. I noticed this behavior in other Rename commands as well, e.g. `Rename PATTERN=* TO=$.\* RECURSE AUTORENAME`. So is this a confirmation of my observation (Autorename doesn't work when files get moved)?

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [September 27, 2018, 11:53am UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/4 "2018-09-27T11:53:41Z")

</div>

> [@lxp](#):
>
> So is this a confirmation of my observation (Autorename doesn't work when files get moved)?

I haven't checked that yet. Busy finishing off the 12.10 release at the moment.

---

<div class="post-metadata">

### Author: ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)
#### Post date: [October 6, 2018, 7:56pm UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/5 "2018-10-06T19:56:50Z")

</div>

Just tried again with the new `WHENEXISTS`, but never got a reaction. Might have something to do with

> If the **PATTERN** and **TO** arguments are both given, the command will normally apply the rename immediately, without prompting for any further interaction;

although e.g. `CASE=extlower` and `RECURSE` will not get ignored.

---

<div class="post-metadata">

### Author: ![Jon](https://resource.dopus.com/user_avatar/resource.dopus.com/jon/32/12713_2.png) [@Jon](https://resource.dopus.com/u/Jon)
#### Post date: [October 12, 2018, 3:57am UTC](https://resource.dopus.com/t/autorename-doesnt-work-as-expected-when-files-get-moved/29994/6 "2018-10-12T03:57:53Z")

</div>

Thanks for the report, this will be fixed in the next beta.
