Hi,
I have years of Delphi & Pascal programming behind me, but on Windows. I am now dabbling with Linux.
I thought I'd write a little utility to copy files in a particular order. essentially
var f1, f2 : String;
r : BOOLEAN;
begin
f1 := <sourcepathandfilename>;
f2 := <destinationpathandfilename>;
if fileexist(f1) AND directoryexists(ExtractFileDir(f2)) then
r := copyfile(f1,f2);
f1 and f2 assignment syntax is consistent with the linux OS requirements.
However, copyfile falls over with an unknown exception if the filenames include spaces.
I have experimented with enclosing the file name in quotes and doublequotes but this doesn't help. Renaming the files is not an option.
Can someone point me in the direction of what needs to be none to manipulate unusually named files under linux.
PS I have the code working fine under Windows.
SOLUTION: Nevermind, it was a simple matter to roll my own function using the fileread/ filewrite routines. It's a pity though that the generic copyfile doesn't work properly.