Move file into folder in drag&drop menu

Hi,

i want to create item in drag&drop (file to folder tree) menu to move file to folder in new folder...

i create this :

dopusrt /cmd Copy MOVE TO HERE CREATEFOLDER "{dlgstring|Nom du dossier de destination...|}"

but this move file to folder in current directory... :cry:

Try changing your button command to:

Copy MOVE CREATEFOLDER "{dlgstring|Nom du dossier de destination...|}"

Some observations:

I've been doing this for a long time (before the CREATEFOLDER argument was implemented with some kulge) and it's probably the drop menu item (along with COPY to new folder) that I use the MOST often:

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

Basically the same as what you first had AlbatorIV... but the {d} modifier at the end fixes your problem in a different way than John's suggestion. Personally, I still like using {d} at the end just for the value of being able to see the path in the dialog... sometimes, if the folder tree scroll-creeps on me while dropping onto a folder in the tree, I might drop onto an unintended sub-dir or something and rather than cancelling- I just adjust the path in the dialog... woohoo.

John's suggestion is an example of the fact that we don't need dopusrt /cmd prefixed to internal commands anymore in v9 to be able to use the control codes like {dlgstring} and {d}. HOWEVER, I've just noticed that omitting it causes a strange side effect... It causes the defined MOVE drop menu action to no longer appear if you're dropping inside the current folder... I guess the lack of the dopusrt statement is causing Opus to fully evaluate the MOVE argument and so suppresses what would otherwise be a non-sensical operation (moving to the current dir) without the CREATEFOLDER argument...

Hi Steje,

Let me rewrite this for the moment eliminating the HERE.

dopusrt /cmd Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{d}}"

Under Vista this works correctly.

Now let's rewrite the code again eliminating the dopusrt /cmd .

Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{d}}"

Under Vista, the dialog string reappears for each file copied/moved and the folder name needs to be specified each time !
The folder was created and a file was copied/moved, but I had to specify the folder for every file !

Eliminate the {d}.

Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...}"

Everything is normal again under Vista.
The dialog string prompts for a folder-name only once and all files are copied/moved.

Can anyone confirm this ?

Zippo

Many thanks...

dopusrt /cmd Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{d}}"

this open a select folder window in xp

Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{d}}"

same thing for me, dialog string open for each time

Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...}"

it's ok with this... but appear only when i drag file to folder tree.

You can prevent the dialog from appearing for every file by using the new variables in Opus 9.

In fact, there's a similar example in the manual:

[quote="manual"]@set = lets you set variables that can be used by the remainder of the function. The variables defined by the @set command can be referred to in any other command using the {$} control sequence. This command is most useful in the situation where the value is defined by a {dlgstring} or similar Opus function. For example,

@set dir = {dlgstring|Enter new folder name to copy files to} createfolder ".\{$dir}" copy to ".\{$dir}"[/quote]

[quote="AlbatorIV"]

dopusrt /cmd Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{d}}"

this open a select folder window in xp[/quote]
Are you actually getting this result when you run this command from a drop menu? Or are you trying this from a button or hotkey as well?

[quote="AlbatorIV"]

Copy MOVE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...}"

it's ok with this... but appear only when i drag file to folder tree.[/quote]
This is probably the same as what I'm seeing when eliminating the dopusrt /cmd prefix...

What happens if you try the full command I posted above?

Note: I also run the following from a hotkey when I want to move files into a new folder in the CURRENT dir:

dopusrt /cmd Copy MOVE TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...|{s}}"

This is because if you've got no 'destination' path involved (beacuse you're just working in the one current SOURCE folder) trying to use the {d} code will indeed cause the 'select folder' dialog to appear to provide a 'destination' folder path...

With this, no problem for me in drop menu:

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

Cool... can you also confirm that if you get rid of JUST the leading dopusrt /cmd prefix to that same command that dropping to another folder in the folder tree (since the dopusrt /cmd prefix seems to cause supression of the drop action in the 'current' folder) also still works AND does not causes separate dialogs for each file/ietm selected for the drop?

if i delete "dopusrt /cmd" and drop file to folder tree:

  • item appear
  • dlgstring appear for each file

[quote="AlbatorIV"]if i delete "dopusrt /cmd" and drop file to folder tree:

  • item appear
  • dlgstring appear for each file[/quote]
    The stuff about variables in my post above should solve that problem.

yes i know... i answered steje
i create this one...

@set dir = {dlgstring|Enter new folder name to copy files to} createfolder "{d}{$dir}" copy move to "{d}{$dir}" Go "{d}{$dir}"

little thing, if i want to cancel, i need to clic "cancel" button for each selected files

Seems going this route kind of takes us backwards from the original value of having had the CREATEFOLDER arg added in the first place. I'll just keep the dopusrt /cmd prefix and life is good.

Heh, I think (unless I've missed something) this whole discussion is moot. :slight_smile:

This command is all you need. No set, dopusrt, or any of that stuff:

Copy MOVE CREATEFOLDER

It will ask you for the folder name and it only asks you once.

Well, not entirely:

Copy MOVE CREATEFOLDER
Dialog prompts: only one - ok
Drop in current folder: action is hidden in drop menu - no good (again, normally supressing a Copy MOVE operation when dropping to the current folder makes sense. If Jon could ALSO evaluate the CREATEFOLDER option to NOT supress a Copy MOVE, this would be good since with the CREATEFOLDER option added a Copy MOVE drop action to the current folder makes sense and should be shown)
Show destination path in the dialog: this command won't do that (not that everyone want it though) - no good

Copy MOVE CREATEFOLDER {Rs|New folder name:|{d}}
Dialog prompts: only one - ok
Drop in current folder: action is still hidden - no good
Show destination path in the dialog: the added {dlgstring} modifier shows the destination path, but ODDLY while only one dialog is shown, only the first selected file is moved :open_mouth: - no good

dopusrt /cmd Copy MOVE CREATEFOLDER {Rs|New folder name:|{d}}
Dialog prompts: only one - ok
Drop in current folder: action is shown - ok
Show destination path in the dialog: shows ok, and all files are moved to the new folder - ok

Weird stuff...