I don't think DOpus will do this sort of rename/move without going into flat view.
Its easy enough to do with standard *nix tools (so I wouldn't waste time creating a special script for this when you can just install a tool set and use those):
I wrote script to move files from subfolders to root selected folders...
Select some folders and clic button...
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
<label>Files2Root</label>
<tip>Move files to root folders</tip>
<icon1>#move</icon1>
<function type="normal">
<instruction>@nodeselect</instruction>
<instruction>@confirm Do you want to move all files to root folders ?|Yes|No</instruction>
<instruction />
<instruction>Rename PATTERN * TO *</instruction>
<instruction />
<instruction>@script vbscript</instruction>
<instruction>Dopus.OutputString "Script: Files2Root - By Albator V"</instruction>
<instruction>Dim ParentPath</instruction>
<instruction />
<instruction>Function Rename_GetNewName ( strFileName, strFullPath, fIsFolder, strOldName, ByRef strNewName )</instruction>
<instruction> If fIsFolder then</instruction>
<instruction> ParentPath = strFullPath & "\" & strFileName</instruction>
<instruction> Set objFSO = CreateObject("Scripting.FileSystemObject")</instruction>
<instruction> Set objFolder = objFSO.GetFolder(ParentPath) </instruction>
<instruction> Set colSubfolders = objFolder.Subfolders</instruction>
<instruction />
<instruction> For Each objSubfolder in colSubfolders </instruction>
<instruction> FolderLoop(ParentPath & "\" & objSubfolder.Name) </instruction>
<instruction> Next </instruction>
<instruction />
<instruction> Set colSubfolders = Nothing </instruction>
<instruction> Set objFolder = Nothing </instruction>
<instruction> Set objFSO = Nothing</instruction>
<instruction> Else</instruction>
<instruction> Dopus.OutputString "Select first some folders."</instruction>
<instruction> End If</instruction>
<instruction>End Function </instruction>
<instruction />
<instruction>Function FolderLoop(Path) </instruction>
<instruction> Set objFSO = CreateObject("Scripting.FileSystemObject")</instruction>
<instruction> Set objFolder1 = objFSO.GetFolder(Path) </instruction>
<instruction> Set colSubfolders1 = objFolder1.Subfolders </instruction>
<instruction> Set colFiles = objFolder1.Files </instruction>
<instruction> </instruction>
<instruction> For Each objFile in colFiles </instruction>
<instruction> Fichier = Path & "\" & objFile.Name</instruction>
<instruction> objFSO.MoveFile Path & "\" & objFile.Name, ParentPath & "\" </instruction>
<instruction> Dopus.OutputString "Move " & fichier</instruction>
<instruction> Dopus.OutputString "to " & ParentPath</instruction>
<instruction> Next </instruction>
<instruction />
<instruction> For Each objSubfolder1 in colSubfolders1 </instruction>
<instruction> FolderLoop(Path & "\" & objSubfolder1.Name) </instruction>
<instruction> Next </instruction>
<instruction />
<instruction> objFSO.DeleteFolder(Path) </instruction>
<instruction> Dopus.OutputString "Delete " & Path</instruction>
<instruction> Set colSubfolders1 = Nothing </instruction>
<instruction> Set objFolder1 = Nothing </instruction>
<instruction>End Function </instruction>
</function>
</button>
I know this an old post but for future reference this may be useful...
I was searching to solve the same problem, after a bit of trial and error I've created a button with the following function:
Copy MOVE TO={filepath$|..\..}
This seems to work fine on multiple selections within 'Grouped' view, very useful when paired with filtered selections and a lot simpler than using a vbs.
Yes, but your script don't solved my original request.
Your command move up selected files, my request was : move up files that are in subfolders of selected folders.