Thread: help - using c to test file attributes

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    1

    help - using c to test file attributes

    Here is my problem. I need to write a program that runs and checks files in a windows directory - if the create date = system date they need to be moved to a different area of our LAN. I'm new to C and I'm not sure of the easiest/best way to accomplish this task. Any input would be appreciated. Thanks.

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    FindFirstFile(), FindNextFile(), and FindClose() to do clean up.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    119
    After you find each file, You can use GetFileAttributesEx() and the WIN32_FILE_ATTRIBUTE_DATA structure to access the creation date of each file.

    -Futura
    If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
    What happens is not as important as how you react to what happens. -Thaddeus Golas

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM