home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20168 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  41 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!math.fu-berlin.de!neuro.informatik.uni-kassel.de!jochenr
  3. From: jochenr@neuro.informatik.uni-kassel.de (Jochen Ruhland)
  4. Subject: Re: File manipulation from a program...PLEASE HELP!
  5. Message-ID: <P440JGM@math.fu-berlin.de>
  6. Sender: news@math.fu-berlin.de (Math Department)
  7. Organization: FG Neuronale Netzwerke - Uni Kassel
  8. References:  <C1BH3B.5pD@cs.uiuc.edu>
  9. Date: Mon, 25 Jan 1993 13:36:42 GMT
  10. Lines: 29
  11.  
  12. In article <C1BH3B.5pD@cs.uiuc.edu>, pardee@cs.uiuc.edu (Jason Pardee) writes:
  13. |> i want to know if there is a way to rename a file from a C program.  you know,
  14. |> the equivalent of the command 'ren ldfilename> <newfilename>'.  is there
  15. |> such a function in C?
  16. This is what UNIX-C says, but as part of stdio, it works for all DOS-C
  17. Compilers that I know (Dammed, I saw a lot of passing by!)
  18.   rename Subroutine
  19.   
  20.   Purpose
  21.   Renames a directory or a file.
  22.   Library
  23.   Standard C Library (libc.a)
  24.   Syntax
  25.   #include <stdio.h>
  26.   int rename (FromPath, ToPath)
  27.   const char *FromPath, *ToPath;
  28.   
  29.   Description
  30.   The rename subroutine renames a directory or a file within a file
  31.   system.
  32. The sub even can move a file to a different dir, if that dir exists on
  33. the same drive. It does not expand wildcards, as the DOS command.com
  34. does.
  35. -- 
  36. *     FG Neuronale Netzwerke / Uni Kassel       * 
  37. *     Jochen Ruhland                            *
  38. *     Heinrich-Plett-Str. 40                    *
  39. *     D-3500 Kassel                             *
  40. *     jochenr@neuro.informatik.uni-kassel.de    *
  41.