Monday, May 24, 2010

How do i move files using C program?

i wanna know what should be the logic to write a c program which moves a file from one directory to other location in windows?

How do i move files using C program?
You should use the 'rename' function (not MoveFile, which is not C Runtime but a Windows function). See the link below.
Reply:The logic is:





Move File "F" to location "L".





The syntax depends on how you wanna do it. Do you always want to overwrite any files that might be there already, do you want the new file to append to the old one, do you need to keep old versions of the files, etc.
Reply:MoveFile





The MoveFile function renames an existing file or a directory (including all its children).





QuickInfo


Windows NT: Requires version 3.1 or later.


Windows: Requires Windows 95 or later.


Windows CE: Requires version 1.0 or later.


Header: Declared in winbase.h.


Import Library: Use kernel32.lib.


Unicode: Implemented as Unicode and ANSI versions on Windows NT.

sound cards

No comments:

Post a Comment