www.pudn.com > cghost.rar > NDIR.C


#include  
#include  
#include  
 
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"); 
	} 
 }