# Move files by date

**URL:** <https://resource.dopus.com/t/move-files-by-date/3064>\
**Category:** Help & Support\
**Created:** [February 26, 2007, 8:35am UTC](https://resource.dopus.com/t/move-files-by-date/3064 "2007-02-26T08:35:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [February 26, 2007, 8:35am UTC](https://resource.dopus.com/t/move-files-by-date/3064/1 "2007-02-26T08:35:00Z")

</div>

Hello all,

i want to know if it's possible to create button to :

- select all files in current folder
- create folder for each file date
- move files under folder

i remember a little plugins to move files by extension : [[Move by extension](http://resource.dopus.com/t/move-by-extension/1460/1))

---

<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:** [February 26, 2007, 8:52am UTC](https://resource.dopus.com/t/move-files-by-date/3064/2 "2007-02-26T08:52:49Z")

</div>

If you turn on Enable file information fields in the Advanced Rename dialog then you can use {modifieddate} etc. in the new name and use \ to create subdirectories. (A drop-down menu appears which lets you insert the {...} codes without having to know their names.)

At the moment you cannot change the format of the date which {modifieddate} turns into in the Rename dialog so you will probably have to do the job in two passes: The first moving everything into folders with names like 20\_02\_2006 and the second renaming those folders to the format you want using a regular expression or similar.

Making it so you can specify a date format with {modifieddate} etc. in the Rename dialog is on the list of things for the next version.

Edit/Note: This is no longer true and you can now set the date format. See the examples below.

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [February 26, 2007, 9:02am UTC](https://resource.dopus.com/t/move-files-by-date/3064/3 "2007-02-26T09:02:10Z")

</div>

ok, i try this... but how create new folder with \ ???

---

<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:** [February 26, 2007, 9:12am UTC](https://resource.dopus.com/t/move-files-by-date/3064/4 "2007-02-26T09:12:36Z")

</div>

Just put \ in the new name.

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [February 26, 2007, 9:21am UTC](https://resource.dopus.com/t/move-files-by-date/3064/5 "2007-02-26T09:21:48Z")

</div>

Ok it's work...

but it not possible to have folder with dd\_mm\_yyyy instead of day name ?

How write this for button ?

 ![](https://resource.dopus.com/uploads/default/original/3X/0/d/0d0239420efb64a887aafb321021dca6894f3979.png)

---

<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:** [February 26, 2007, 9:42am UTC](https://resource.dopus.com/t/move-files-by-date/3064/6 "2007-02-26T09:42:36Z")

</div>

For now you'll have to turn off the option in Preferences which uses day names for dates in the last week. Hopefully the next version will let us specify a date/time format as part of the rename.

Edit/Note: This is no longer true. See the examples below.

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [March 2, 2007, 8:17am UTC](https://resource.dopus.com/t/move-files-by-date/3064/7 "2007-03-02T08:17:08Z")

</div>

i try to create button for this but don't work 😢

```auto
Rename REGEXP "(.*)" TO "{modifieddate}\\\0"
```

need help

---

<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:** [March 2, 2007, 2:01pm UTC](https://resource.dopus.com/t/move-files-by-date/3064/8 "2007-03-02T14:01:02Z")

</div>

Here you go:

```auto
Rename REGEXP PATTERN "(.*)" TO "{modifieddate}\\\0" FILEINFO
```

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [March 2, 2007, 2:10pm UTC](https://resource.dopus.com/t/move-files-by-date/3064/9 "2007-03-02T14:10:22Z")

</div>

it's perfect...  
many thanks

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [May 4, 2007, 8:31pm UTC](https://resource.dopus.com/t/move-files-by-date/3064/10 "2007-05-04T20:31:19Z")

</div>

i need to move file in folder with this format "yyyy-mm" ?

---

<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:** [May 4, 2007, 10:21pm UTC](https://resource.dopus.com/t/move-files-by-date/3064/11 "2007-05-04T22:21:31Z")

</div>

Try this:  
 ![](https://resource.dopus.com/uploads/default/original/3X/d/3/d3429bd2acca469ee69d2fd1e491ed772184cbfe.png)

---

<div class="post-metadata">

**Author:** ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)\
**Post date:** [May 17, 2007, 9:59am UTC](https://resource.dopus.com/t/move-files-by-date/3064/12 "2007-05-17T09:59:14Z")

</div>

i use this to move file under folder...

`Rename REGEXP PATTERN (.*) TO {modifieddate|D#yyyy-MM}\\\0 FILEINFO
`  
but if file already exist in folder an error message appear.  
it's possible to skip this message or better, show remplacement window (with remplace all, rename old...) ❓

---

<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:** [May 18, 2007, 8:15am UTC](https://resource.dopus.com/t/move-files-by-date/3064/13 "2007-05-18T08:15:20Z")

</div>

> [@AlbatorIV](#):
>
> but if file already exist in folder an error message appear. it's possible to skip this message

Add the AUTORENAME argument and the clashing files will be renamed automatically to something that doesn't clash. It will rename the new files and you don't get any control over how it makes the new name (I think it puts a number at the end) but it gets rid of the error.
