FAQ- Accessing Directories and Files Within (need further info)

This is a discussion on FAQ- Accessing Directories and Files Within (need further info) within the Windows Programming forums, part of the Platform Specific Boards category; Hi I studied the win32 code for accessing the directory and files within. What I need to do is rename ...

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    23

    FAQ- Accessing Directories and Files Within (need further info)

    Hi
    I studied the win32 code for accessing the directory and files within. What I need to do is rename certain files in the directory. Right now using the code I can access the names of the files however I cannot change their names.
    Can anyone guide me as to what other functions are availabe in windows.h file that I can use for renaming. Also is there any other way of having a list giving me what other functions are available and their description or documentation

    I know one way would be to make new files (with whatever name I want ) and copy the contents of the current file to new one. But that is time consuming process and is not necessary

    Thanks
    Nipun

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669
    MoveFile()

    Click on "File Management Functions" under "See Also".
    Use the table of contents frame on the left to explore other functional groups of the Win32 API.

    gg

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    23
    Thanks for the help the website gives me lot of funtions which will very useful for me,
    I also saw this other function called rename( ) from previous threads which would be very useful for me

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You can also use SHFileOperation to rename files.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669
    >> I also saw this other function called rename( ) from previous threads
    rename() simply calls MoveFile()
    It's usefull if you trying to stick with ISO C-standard functions.

    Skin that cat however you like

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating and deleting directories and deleting files
    By fguy817817 in forum C Programming
    Replies: 1
    Last Post: 04-08-2009, 07:26 AM
  2. Directories and files using dirent.h
    By totalnewbie in forum C Programming
    Replies: 6
    Last Post: 11-19-2008, 04:10 PM
  3. Problem with FAQ on directories
    By glopv2 in forum C Programming
    Replies: 1
    Last Post: 07-30-2007, 03:44 PM
  4. problem while opening files from multiple directories
    By V.G in forum Windows Programming
    Replies: 2
    Last Post: 11-08-2004, 02:29 PM
  5. retrieving drive directories and files
    By PURE_POWER in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 06-01-2003, 02:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21