ex26.pp 483 B

12345678910111213141516171819
  1. Program Example26;
  2. { This program demonstrates the CreateDir and RemoveDir functions }
  3. { Run this program twice in the same directory }
  4. Uses sysutils;
  5. Begin
  6. If Not FileExists('NewDir') then
  7. If Not CreateDir ('NewDir') Then
  8. Writeln ('Failed to create directory !')
  9. else
  10. Writeln ('Created "NewDir" directory')
  11. Else
  12. If Not RemoveDir ('NewDir') Then
  13. Writeln ('Failed to remove directory !')
  14. else
  15. Writeln ('Removed "NewDir" directory');
  16. End.