Hi guys!
I have a question about a function I want. I don't know if it is solveable by using the Dopus script or not, or if this function are possible by using the existing functions in Dopus.
I need a function that works like this;
I select a file.
I right click at that file and choose "make a folder with same filename and put file in that folder"
Just like winrar do "extract to separate folders", only opposite so to speak
Preferrably it would work on multiple files.
How should i proceed?
I have never tried Dopus scripting so i have no idea whether this can be fixed using that.
@nofilenamequoting
@runonce:@set dirname={dlgstringS|Enter name of folder to move selection into|{file$|noext}}
Copy MOVE HERE FILE="{file$}" CREATEFOLDER="{$dirname}"
this other button does the opposite
names the file the folder name FileName = FolderName.dcf (605 Bytes)
@nodeselect - Delete underscores, points and %20 - Upper case for words, after hyphens and parenthesis - Lower case for extensions
Rename PRESET="File = Foldername"
Thank you very much guys!
I placed it on the toolbar and got it to work, even for multiple files!!
But how do i attach it to the context menu?
I'm an idiot, plz explain
Settings / Filetypes / All files / Context Menu Tab / New / Add Action Name (i.e. Move to new folder with same name) then add the code into the box at the bottom of the dialog.
@Leo I think it would be useful if we could drag a .dcf file into the context menu. We can already drag an existing item from one context menu to another so why not a .dcf file as well?
Oh yeah. It went better when i ignored the *.dcf file and just pasted the code.
Thank you
But how do i do it if i have a dcf-file and no code, and want the function of the .vcf file in a context menu?
...and is there a downloadable opus scripting manual anywhere?
Searched a little, couldn't find any.
A manual with examples and stuff, that starts with the easy things and work its way up?
If you only had a .dcf file, you could put it on a toolbar temporarily and then edit it to see which commands it runs, then paste them into a context menu item.
.dcf files are also text/XML, so you can often just open them in a text editor or the viewer pane to see what they do. But be careful of things like quotes which get encoded to " in the XML, and things like that, which you don't need to worry about if you do it the other way.
Context menus and toolbars are quite different behind the scenes (not least because context menu items might be stored in the registry and need to work outside of Opus, depending on the type of item). That's why .dcf files can't be dragged directly into context menus like they can with toolbars. (Of course, nothing is impossible, so the ability to add that might be added one day, but it has some complexities.)
Push F1 in the program, or use the Manual links at the very top-right of the forum, or on the main GPSoft site.
Ok, it worked flawlessly
And if i want to do the opposite?
Select a folder
Move the file(s) in that folder one step up in the catalog structure and remove the folder
?
If you can make it in script form i would appreciate it
It seems code is easier to incorporate into context menus
Hi Birba
First you need to have the button on your toolbar.
Download button to your pc.
Right click on a toolbar, click customize.
Then drag the button (dcf file you downloaded) to your toolbar.
click ok...
Once button is on your toolbar.
Make sure the file you wish to rename is inside a folder.
Click on the file, then click on the button (on toolbar).
File will automatically rename itself same name as the folder name.
There is something strange, probably accidental, about the second button.
I edited the post to put the commands into the post so it's easier to see what we're talking about, and noticed the second button has a lot of extra text on the first line which doesn't look like it should be there. (It's off to the right so you may need to scroll to see it.)
You'd need a rename preset called File = Foldername for it to work as well.
@nofilenamequoting @runonce:@set dirname={dlgstringS|Enter name of folder to move selection into|{file$|noext}}
Copy MOVE HERE FILE="{file$}" CREATEFOLDER="{$dirname}"
I am doing something wrong; it works, but only on one file. If i select multiple files, it prompts me for the first folder name and then it puts all the files in that folder.
Well, kind of.
It works perfectly for one file.
But if you have multiple files that you want to put in separate folders with their separate names on it, it fails; it will put every file in ONE folder.