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