www.pudn.com > c.rar > NEDIR.C, change:1997-01-25,size:425b


#include <stdio.h> 
#include <dir.h> 
#include <string.h> 
 
main(int argc,char *argv[]) 
{ 
 char presname[MAXPATH],futname[MAXPATH]; 
 
 if(argc>2) 
	{ 
	strcpy(presname,argv[1]); 
	strcpy(futname,argv[2]); 
	} 
 else 
	{ 
	printf("Usage: redir [dirname newname]\n"); 
	exit(1); 
	} 
 
 if(rename(presname,futname)==0) 
	exit(0); 
 else 
	{ 
	printf("\nThere was a problem renaming the directory!\n"); 
	exit(2); 
	} 
 }