I have this code
showmessage('C:\TEMP\'+openfiles[openfilelist.ItemIndex].ID);
if removedir('C:\TEMP\'+openfiles[openfilelist.ItemIndex].ID) then
showmessage('Removed')
else
showmessage('Failed');
the message shows 'C:\TEMP\0' and this directory does exist as the program created it earlier and used files inside it and then later deletes them. I can see the files and directories so I know they're there. The program successfully deletes the files but does not remove the directory.
If I hardcode the directory it works - this means that it accepts the string 'C:\TEMP\0' but does not accept 'C:\TEMP\'+openfiles[openfilelist.ItemIndex].ID both equate to 'C:\TEMP\0'. I cannot hardcode these directories, so what can I do? How do I convert from a string+string to whatever removedir() is expecting. I looked this up at Delphi basics and it's expecting a string...
Hummm I'm confused but string+string does= string. What is going on?