Copy Filenames to a Clipboard

Copy Filenames to a Clipboard

File hierarchies are becoming more complex and file paths longer as the capacity of hard drives increases. There are still many occasions, however, when you can’t browse to identify a file to be used?for example, when entering a constant in VB source. Normally, there is no alternative but to type in the path?this can be both tiresome and error-prone.

The solution: Create a new Standard EXE project, delete the default form (Form1), and add a module (Module1 by default). Type this code into Module1:

Sub Main()	Clipboard.SetText Command$End Sub

Under Project | Project Properties, set the Startup Object to Sub Main. Give the project a suitable name (for example, filename) and create the executable (in this case, filename.exe). Create a shortcut to the executable on your desktop. When the name of file is required, browse using Explorer or My Computer. Drag the file and drop it onto the filename shortcut. The full path of the file is now on the clipboard and you can paste it as necessary.

This works because dropping an object onto a program or its shortcut starts it with the name of the object in the command line. The program merely reads the command line and puts it onto the clipboard.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several