Can't figure out how to make a couple buttons for SelectEx & ClipboardEx

I need help making a couple buttons because I couldn't figure it out with a few hours of effort since I have little experience with this kind of thing :confused:
The first thing I wanted to do is create a SelectEx button that used a list of filenames from the clipboard to select files with the same names but different extensions.
The second would be with ClipboardEx to paste empty files from filenames/files in the clipboard to the current folder.


I'm not an expert on SelectEx / ClipboardEx, so I'll let tbone give the best answers there, but for the second part, you can use this script/button, if it helps:

Thanks Leo!
That fixed the second problem :smiley:

  1. Select files from clipboard ignoring extension
    You can do that if you are willing to massage the clipboard/text-file content beforehand.
    Every line needs to be prefixed with "REGEX=" and you need to switch any file extension into ".*".
    To select ignoring the extension and not doing the modifications on the clipboard/file content beforehand every time, some addition to SelectEx is needed it seems. Maybe a standalone script is more appropriate, it depends on how often and in what way you need that functionality.

  2. Create empty files/folders from clipboard with ClipboardEx
    Congrats, you found a bug. o) Arguments were not passed correctly internally. I fixed it. You'd need to update the script-addin before you try again, this is unless you don't like to stick with Leos working solution. ClipboardEx automatically removes the drive or UNC hostname from paths to always make them relative, so whatever is in the clipboard (files or text with path and file information), ClipboardEx will paste empty data into your current folder/tab with the full path (and always ignoring the drive/location if present).

If you want to create empty files in the current folder/tab without paths, you need to use clipboard text with only filenames, which you get easily by using DOs "Copy File Names" function from the Edit menu (Clipboard COPYNAMES=nopaths).

Leos solution is different here and there. Leos button will use and create absolute path from text clipboard if present, and it will not create nested folders if you copied files and folders directly.

You run "ClipboardEx PASTEEMPTY" from the DO commandline (press ">" to make it appear), or create a button with the same command.

I couldn't figure out the solution on the first one. I tried adding the "REGEX=" and changing the extension to ".*" in a notepad program for both filenames and entire paths but neither made the load from clipboard button work (there wasn't any spaces in the path if that matters..).
The process would need to be done often. I have 100k+ files for various purposes without any metadata in one folder and thousands of json files with the same names containing all the metadata in another folder. I was planning on using the find tool to only show json files with the data I wanted so I could copy the file names to select the non-json files I wanted. There isn't really anything I can do about not using json files for this since the data is scattered throughout the files and there is way too much data to put in a filename anyway. It would be very useful to do this away from home using a phone with remote desktop, as well. I wouldn't be able to edit the clipboard while streaming :confused:
As for the second one, being able to do it across different drives really helps :smiley: Thanks

The "Load Selection from.. Clipboard" also uses the EXACT option, so it does not allow for regex in the clipboard -> my fault, sorry! o) Try the simpler command "SelectEx FROMCLIP MAKEVISIBLE", I tried with following little example and it worked right away: REGEX=.*\.avi

If you are able to get the json files into one DO file display and what is to be selected in the other, things look better.
You could use the native command "Select SOURCETODEST=noext" for this e.g. Something close could be pulled up with SelectEx as well I think, but maybe that already get's you somewhere.

Consider to show some example filenames (json and the other), it's always easier to come up with a solution if you can stare at the problem and think. o)

I usually use a dual display so the “Select SOURCETODEST=noext” works great :smiley:
Thank you so much for your help :smiley: