Copying (or moving) a file

I try to copy a file using CopyFile function:

Windows.CopyFile(PChar(SourceFile), PChar(TargetFile), True);

The file is copied, but not to a target folder, but to the SourceFile folder. The same is when I try MoveFile().

The folders are specified correctely. I use D6 and WinXP.
Who is Participating?
Tell us how do you specify the folders and make sure that you use absolute paths ('C:\folder1\folder2\'), not relative ('\folder2').
shrlduAuthor Commented:
Sorry, my simple and stupid error. Thanks for your comment! :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.