home *** CD-ROM | disk | FTP | other *** search
/ Programming Win32 Under the API / ProgrammingWin32UnderTheApiPatVillani.iso / Chapter9 / cmd32 / RMDIR.C < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-29  |  1.6 KB  |  61 lines

  1. /****************************************************************/
  2. /*                                */
  3. /*                 rmdir.c                */
  4. /*                                */
  5. /*              command.com rmdir command            */
  6. /*                                */
  7. /*            Copyright (c) 1995            */
  8. /*            Pasquale J. Villani            */
  9. /*            All Rights Reserved            */
  10. /*                                */
  11. /* This file is part of CMD32.                    */
  12. /*                                */
  13. /* CMD32 is free software; you can redistribute it and/or    */
  14. /* modify it under the terms of the GNU General Public License    */
  15. /* as published by the Free Software Foundation; either version    */
  16. /* 2, or (at your option) any later version.            */
  17. /*                                */
  18. /* CMD32 is distributed in the hope that it will be useful, but    */
  19. /* WITHOUT ANY WARRANTY; without even the implied warranty of    */
  20. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See    */
  21. /* the GNU General Public License for more details.        */
  22. /*                                */
  23. /* You should have received a copy of the GNU General Public    */
  24. /* License along with CMD32; see the file COPYING.  If not,    */
  25. /* write to the Free Software Foundation, 675 Mass Ave,        */
  26. /* Cambridge, MA 02139, USA.                    */
  27. /****************************************************************/
  28.  
  29. /* $Logfile$ */
  30.  
  31. /* $Log$ 
  32.  * $EndLog$ */
  33.  
  34. #ifdef VERSION_STRINGS
  35. static BYTE *Rcs = "$Logfile$";
  36. #endif
  37.  
  38. #include <windows.h>
  39. #include "globals.h"
  40. #include "proto.h"
  41.  
  42. BOOL rmdir(INT argc, BYTE *argv[])
  43. {
  44.     if(argc != 2)
  45.     {
  46.         error_message(INV_NUM_PARAMS);
  47.         return FALSE;
  48.     }
  49.     /* for now                            */
  50.     if(!RemoveDirectory((LPCTSTR)argv[1]))
  51.     {
  52.         error_mess_str=argv[1];
  53.         error_message(CANNOT_REMOVE);
  54.         return FALSE;
  55.     }
  56.     else
  57.         return TRUE;
  58. }
  59.  
  60.  
  61.