Comparing Long And Short File Names

Comparing Long And Short File Names

When you reference files in Windows 95, you may encounter situationswhen you are unsure whether you’re working with a long or short file name.This becomes a problem if you are comparing file names or if you are searchingfor a specific file and do not know if it will be given in a long or shortformat. For example, Dir$() will always return a longfile name, but the file you are comparing it to may be entered by a useras either a long or short name.To compare two file names on a level field, you must change them bothto short or to long. Dir$() returns a long file name, so you can take advantageof it as a built-in file name converter. What a plus! Pass it C:PRIVAT~1MYSTUF~1NEWTEX~1.TXTand it will return NEW TEXT DOCUMENT.TXT. The only hitch is that you donot get the path, so you must pass Dir$() to each directory in the path,one by one. To do this, loop backwards through the full path string andlet Dir$() convert each subdirectory. After you get the long file namefrom the path, call Dir$(” C:PRIVAT~1MYSTUF~1″) and get MyStuff back. With each successive call, take the long names that were returnedand concatenate them into a full path string. This process will work evenif you begin with a long file name and path.

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

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes