From: fatz_nyc@my-deja.com Sent: Monday, October 09, 2000 3:10 PM To: Info-VAX@Mvb.Saic.Com Subject: Renaming a file to []. > Good question. Even LIB$RENAME will preserve the part before the > dot. (Not surprising, HELP LIB LIB$RENAME Arguments tells me that > the functionality is the same as the DCL RENAME command! Doh!) SYS$RENAME doesn't - try this. /* ** $ mc []ren */ #include #include #include #include #include main(int argc, char **argv) { int stat; struct FAB fab1, fab2; if (argc < 3) exit(SS$_INSFARG); fab1 = fab2 = cc$rms_fab; fab1.fab$l_fna = argv[1]; fab1.fab$b_fns = strlen(argv[1]); fab2.fab$l_fna = argv[2]; fab2.fab$b_fns = strlen(argv[2]); stat = sys$rename(&fab1,0,0,&fab2); if (!(stat & 1)) exit(stat); } /* ** Fatz */ Sent via Deja.com http://www.deja.com/ Before you buy.