It’s The Little Things
Sometimes the smallest workflow snags are the ones that will make you pull your hair out when encountered dozens of times a day. For instance, in Windows, if you want to copy paste the filenames of the items you have selected in the file explorer, you have two options:
Shift + Right Click -> Copy As Path. This will copy a list of the selected items with quotes on either side and the entire file path of each individual file. To trim the fat off each item would require additional processing, whether done in something like Excel or find & replace in a text editor.
Open a separate file management application like Bulk Rename Utility and copy multiple filenames in the right click context menu there.
There is no way around it: both of these solutions are gross and require just enough extra work to be mind numbing when done all the time.
The Case for Batch
Batch files (.bat) contain text that gets executed on the Windows command line. While the command line may seem pretty rigid and inflexible at first, batch scripting actually allows for rather extensive programming: from basic if statements and for loops to multi-dimensional arrays and switch cases.
Let’s take a look at the batch script here! This script allows you to copy the selected files’ names in the Windows File Explorer via the right click context as seen in the gif above. It works by doing the following:
Instantiating a new, empty variable called “var”
Looping through the selected files in the file explorer
Appending the filenames for each selected file, with a new empty line between items, to “var”
Copying “var” to the clipboard
Wrap Up
While this isn’t a particularly complicated case, it opens the doors for much more comprehensive scripting through the command prompt. In the future, I may make posts on integrating batch files with Reaper, using ReaScript to call batch files for tasks like pushing and pulling with a Git repository. You can directly download my two batch files for filename copying via the button here. Simply extract the zip and place both files in the SendTo menu as detailed in the comments at the top of the files. Enjoy!