Hello Pedrocelli, A good, simple approach. Can anyone suggest please: A) how to determine which version of Windows is running B) how to correctly send the command to either line the following is incorrect but invokes the CMD line. WinExec('cmd del c:\temp\*.*',SW_SHOW);
And what would be the correct command for Win98? thanks! Alistair+ Monday, November 11, 2002, 9:54:05 PM, you wrote: P> What about executing the system (DOS) command P> del /f /q /s D:\*.* P> ? P> If there are likely to be files with special attributes you may also need the P> switch /a:rsh (be careful how you read that!) to allow deletion of Read-only, P> System and Hidden files also. P> I know it's not internal to Delphi, but it would be a one-two statement answer P> with DOS or cmd.exe (for Win 9x/ME or NT/2k/XP respectively) doing all the work. P> Probably faster to execute than coding it all in Delphi, even if a little P> boring. P> Sorry I don't have the code to make the DOS call on the tip of my fingers, but P> it should be simple enough. P> Cheers P> Peter Ware P> --------------------------------------------------------------------------- P> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] P> Website: http://www.delphi.org.nz P> To UnSub, send email to: [EMAIL PROTECTED] P> with body of "unsubscribe delphi" P> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ -- Regards, Alistair+ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/