# Copy move createfolder: to copy multiple files into 1 folder named after the 1st file name

**URL:** <https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241>\
**Category:** Help & Support\
**Created:** [January 5, 2022, 10:48am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241 "2022-01-05T10:48:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![opw62](https://resource.dopus.com/letter_avatar_proxy/v4/letter/o/5e9695/32.png) [@opw62](https://resource.dopus.com/u/opw62)\
**Post date:** [January 5, 2022, 10:48am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/1 "2022-01-05T10:48:06Z")

</div>

I have the following in the context menu:

```nohighlight
Copy MOVE CREATEFOLDER "{dlgstringS|Name of Folder to move to...|{file$|noext}}"

```

This is fine for a single file.

When I wish to copy multiple files that way, it will obviously ask for each file.

I would like to select a number of files, use an adjusted menu to move them into a single folder named after the first one that I can (preferably) first edit before proceeding.

Example - files are like

```nohighlight
Calendar - Versions 52-000.jpg
Calendar - Versions 52-001.jpg
Calendar - Versions 52-002.jpg
Calendar - Versions 52-003.jpg

```

etc.

I select those, then use a command that asks for the filename that takes the 1st name 'as a base' - I would then remove the trailing part (52-000) and click OK to have the files stored in a folder named  
'Calendar - Versions'

Right now I select the first file, hit F2, select 'Calendar - Versions', copy to clipboard  
then use

```nohighlight
dopusrt /CMD Copy MOVE TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...: {d}|{d}}" 

```

and paste the text.

Any suggestions?

Thanks!

---

<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:** [January 5, 2022, 10:51am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/2 "2022-01-05T10:51:04Z")

</div>

Try this:

```nohighlight
@set name {dlgstringS|Name of Folder to move to...|{file$|noext}}
Copy MOVE CREATEFOLDER "{$name}"

```

---

<div class="post-metadata">

**Author:** ![opw62](https://resource.dopus.com/letter_avatar_proxy/v4/letter/o/5e9695/32.png) [@opw62](https://resource.dopus.com/u/opw62)\
**Post date:** [January 5, 2022, 10:56am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/3 "2022-01-05T10:56:39Z")

</div>

> [@Leo](#):
>
> ```plaintext
> @set name {dlgstringS|Name of Folder to move to...|{file$|noext}}
> Copy MOVE CREATEFOLDER "{$name}"
> 
> ```

Wow!  
This is perfect, **thank** you so much.

This is really time saver - should have asked earlier...

Thanks again!

---

<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:** [September 16, 2023, 8:34am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/4 "2023-09-16T08:34:23Z")

</div>

If I select folders and run this command, prompt alert says that is not possible to move folder into itself.

![image](https://resource.dopus.com/uploads/default/original/3X/0/1/014a0dc2fd5f57592fb9a224ba4ca8adf4de8bd1.png)

Is it possible to _keep_ skip this alert ? I try `WHENEXISTS=skip` without success.

---

<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 16, 2023, 8:48am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/5 "2023-09-16T08:48:24Z")

</div>

You want it to skip all folders, or something else?

---

<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:** [September 16, 2023, 9:22am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/6 "2023-09-16T09:22:44Z")

</div>

Oups... Skip not keep... so skip this prompt

---

<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 16, 2023, 10:22am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/7 "2023-09-16T10:22:10Z")

</div>

You could add @filesonly to the button so it skips all folders.

---

<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:** [September 16, 2023, 11:50am UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/8 "2023-09-16T11:50:07Z")

</div>

Yes but I want to move folders too...  
So it's not possible to skip this alert ?

---

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [September 16, 2023, 12:30pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/9 "2023-09-16T12:30:54Z")

</div>

I added a drop-down list of filenames.  
[Quick buttons for directory organisation - Buttons/Scripts - Directory Opus Resource Centre (dopus.com)](https://resource.dopus.com/t/quick-buttons-for-directory-organisation/6532/27)

---

<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 16, 2023, 12:48pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/10 "2023-09-16T12:48:58Z")

</div>

> [@AlbatorV](#):
>
> Yes but I want to move folders too...

Move them where? The error happens if they're being moved in an invalid way, so skipping it will be the same as skipping the folders themselves. (Depending on what the destination is, of course.)

---

<div class="post-metadata">

**Author:** ![opw62](https://resource.dopus.com/letter_avatar_proxy/v4/letter/o/5e9695/32.png) [@opw62](https://resource.dopus.com/u/opw62)\
**Post date:** [September 16, 2023, 1:22pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/11 "2023-09-16T13:22:26Z")

</div>

FWIW - I've set it up this way

 ![SnagIt-16092023 150435](https://resource.dopus.com/uploads/default/original/3X/1/1/1148e4e23a8e2403f660fe8881dd664058e1cdc0.png)

[/uploads/default/original/3X/5/9/59e29b65b0fc198cd5aac34c7cff4b6b61072d5c.mp4](https://resource.dopus.com/uploads/default/original/3X/5/9/59e29b65b0fc198cd5aac34c7cff4b6b61072d5c.mp4)

ignore the 'extra' about changing the date stamp after newest file in folder.

---

<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:** [September 16, 2023, 2:38pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/12 "2023-09-16T14:38:44Z")

</div>

Here my example...

[/uploads/default/original/3X/e/c/ecbfb0b852ef8dc54f1dc67ef47fb328f73b36f5.mp4](https://resource.dopus.com/uploads/default/original/3X/e/c/ecbfb0b852ef8dc54f1dc67ef47fb328f73b36f5.mp4)

I understand that is not possible to move folder into itself, so I ask if it's possible to skip this error message but move others folders and files selected to it...

---

<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 16, 2023, 2:53pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/13 "2023-09-16T14:53:32Z")

</div>

Either deselect the folder before copying or copy everything into a temp folder and rename or copy that folder in a second step.

---

<div class="post-metadata">

**Author:** ![WKen](https://resource.dopus.com/letter_avatar_proxy/v4/letter/w/eb9ed0/32.png) [@WKen](https://resource.dopus.com/u/WKen)\
**Post date:** [September 16, 2023, 3:40pm UTC](https://resource.dopus.com/t/copy-move-createfolder-to-copy-multiple-files-into-1-folder-named-after-the-1st-file-name/40241/14 "2023-09-16T15:40:41Z")

</div>

Scripting, I have updated all to v1.6.1.

 ![image](https://resource.dopus.com/uploads/default/original/3X/3/2/328c88864bdb58c781da8128d2fa061e801ea82c.png)
