get the file names

This is a discussion on get the file names within the C++ Programming forums, part of the General Programming Boards category; Can I get the file names of the current directory using c++? I need the filenames in order to covert ...

  1. #1
    Compiling
    Join Date
    Jun 2003
    Posts
    69

    get the file names

    Can I get the file names of the current directory using c++?
    I need the filenames in order to covert their format (images).
    If not, may be I just write a bash script to do that.
    thx!

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,077
    Sent from my iPadŽ

  3. #3
    Compiling
    Join Date
    Jun 2003
    Posts
    69
    no, linux, g++

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,833
    getcwd?

    opendir / readdir / closedir - to read all the filenames in a directory

    stat() to tell you about each entry - like whether it's a file or a directory

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File being filled with NULLs
    By Tigers! in forum Windows Programming
    Replies: 2
    Last Post: 06-30-2009, 06:28 PM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 08:51 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 11:12 PM

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