Thread: check for / modify file in hidden folder

  1. #1
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378

    check for / modify file in hidden folder

    hey...i was wondering how i would go about checking for and modifying a file thats in a hidden folder. do i need to modify the properties of the folder? or the file? (the file i want to check for and modify is in the Application Data folder). this code didn't work:
    Code:
    fileptr = fopen("%APPDATA%/.gaim/status.xml", "r");
    thanks
    Registered Linux User #380033. Be counted: http://counter.li.org

  2. #2
    old man
    Join Date
    Dec 2005
    Posts
    90
    Dot files are conventionally treated differently by unix utilities and apps, but as far as standard C functions are concerned, they're just files with filenames that start with a dot. They're not hidden per se.

    edit: oops, I forgot we're talking about dirs, but it's the same thing.

    However, you need to explicitly spell out your pathnames, so if APPDATA is an environment variable, then grab it with getenv() ...
    Last edited by eerok; 02-07-2006 at 01:07 PM.

  3. #3
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    yes, that function is what i needed.
    thank you
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  3. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  4. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM