MoveFile command (Delphi 32)

MoveFile command (Delphi 32)

Question:
The MoveFile command does not work for me with some filenames. An example is as follows :

MoveFile(‘C:CIPLINCOMING199702110408440000000000.SAV’, ‘C:CIPLARCHIVE’);
yet, if I try to move a file called ‘test.sav’ with the same line, it works. In the first case – Delphi just refuses to move the file. It doesn’t crash.I looked up MoveFile – and it makes a direct call to kernel32.dll. I am using the updated version of Windows 95 (OSR2). Are there any alternatives to moving files? (i’ve tried CopyFile and DeleteFile – but that does not solve the problem either).

Answer:
You might try enclosing the entire path in double quotes, so your line readsas follows:

MoveFile(‘”C:CIPLINCOMING199702110408440000000000.SAV”‘,’C:CIPLARCHIVE’);
This is a Windows thing. Any 8.3 DOS format files will work, butdouble-quoting seems to solve a lot of these types of problems.

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