www.pudn.com > c.rar > NDIR.C, change:1997-01-26,size:431b


#include <stdio.h> 
#include <dir.h> 
#include <string.h> 
 
main(int argc,char *argv[]) 
{ 
 char presname[MAXPATH]; 
 
 if(argc>1) 
	{ 
	strcpy(presname,argv[1]); 
	} 
 else 
	{ 
	printf("Usage: redir [dirname newname]\n"); 
	exit(1); 
	} 
 if(!chdir(presname)) 
	{ 
	chdir(".."); 
	if(rmdir(presname)) 
		{ 
		printf("\nfaile to remove  this dir\n"); 
		exit(0); 
		} 
	else printf("\nsuccess to remove  this dir\n"); 
	} 
 }