Toon posts:

[C++] alle bestanden in directory

Pagina: 1
Acties:
  • 39 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik wil door middel van C++ alle bestanden in een opgegeven directory weergeven. Bijvoorbeeld:
directory: c:\prog
main.exe
test.txt
art.txt

Hoe kan ik dit heb beste doen?

  • NDF82
  • Registratie: Januari 2002
  • Laatst online: 13-08 17:12

NDF82

Doomed Space Marine

exec("dir"); ;)

Pentium 233MHz MMX + Diamond Monster 3D 3DFX Voodoo II


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 25-08 12:28

Janoz

Moderator Devschuur®

!litemod

Euhm... Al bij de file classes / file system objects gekeken?

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Verwijderd

Topicstarter
en dir is de betreffende dir?
loop ik dit door met een for?

in asp doe ik het volgende
for each file in folder.files
file.name
next

hoe doe ik dit in c?

  • The End
  • Registratie: Maart 2000
  • Laatst online: 20:43

The End

!Beginning

Kan met de functie 'FindFirstFile' en 'FindNextFile'.

  • MSalters
  • Registratie: Juni 2001
  • Laatst online: 21-08 17:14

Man hopes. Genius creates. Ralph Waldo Emerson
Never worry about theory as long as the machinery does what it's supposed to do. R. A. Heinlein


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 25-08 12:28

Janoz

Moderator Devschuur®

!litemod

Ik denk dat het nu voor de rest redelijk manual werk wordt... En trouwens, die dir van NDF82 slaat op het dos commando.

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'

Pagina: 1

Dit topic is gesloten.