Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Pascal
Expertise: Beginner
Mar 19, 1997



Application Security Testing: An Integral Part of DevOps

MoveFile command (Delphi 32)

The MoveFile command does not work for me with some filenames. An example is as follows :
MoveFile('C:\CIPL\INCOMING\199702110408440000000000.SAV', 'C:\CIPL\ARCHIVE\');
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).

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

This is a Windows thing. Any 8.3 DOS format files will work, but double-quoting seems to solve a lot of these types of problems.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date