Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does Folder contain files?

Status
Not open for further replies.

simmo09

Programmer
Apr 22, 2009
82
GB
Hello, im trying to determine if a folder contains any files, but there are rules:

-> If folder has no files, do nothing

-> If folder has no files, but contains mytextfile.txt then delete mytextfile.txt

-> If folder does contain files, loop through each file and save the filenames to mytextfile.txt

I was thinking of using FindFirst and FindNext, but i am a bit sketchy as to how to approach this.

Much appreciated if someone can help me out.

Thank you
 
ok, i got this sorted.

now i need to know how to extract the filenames from a text file, simple enough im sure...
 
so far, the answer to all of your questions can be answered by pressing 'F1' while in the delphi ide...

Roo
Delphi Rules!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top