cpne.pp 905 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by Pierre Muller,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. program copy_if_not_empty;
  13. uses dos;
  14. var in,out : file;
  15. begin
  16. if paramcount>0 then
  17. begin
  18. assign(in,paramstr(1));
  19. if filerec(in).size=0 then
  20. begin
  21. erase(in);
  22. exit;
  23. end;
  24. end;
  25. if paramcount>1 then
  26. rename(paramstr(1),paramstr(2));
  27. end.
  28. {
  29. $Log$
  30. Revision 1.1 1998-05-12 10:55:23 peter
  31. * moved cpne.pp to install/
  32. }