Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » FindFile, get dir list
FindFile, get dir list [message #18513] Mon, 06 October 2008 05:12 Go to previous message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hi to all,

I've tried to get the list of "D:/111/" this way:
#include <Core/Core.h>
using namespace Upp;

CONSOLE_APP_MAIN
{
	FindFile fifi("D:/111/");
	Vector<String> dirs, files;
	String name;
	
	while (fifi.Next())
	{
		name = fifi.GetName();
		if (fifi.IsDirectory()) dirs << name;
		else                    files << name;
	}
	
	int i;
	Cout() << "=====>> list of dirs:" << '\n';
	for (i=0; i < dirs.GetCount(); i++)
		Cout() << dirs[i] << '\n';
	
	Cout() << "=====>> now the files:" << '\n';
	for (i=0; i < files.GetCount(); i++)
		Cout() << files[i] << '\n';
	
	system("pause");
}

what did not work. Anything wrong here?

Martin
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to subtract some days/months to a date variable?
Next Topic: Xmlize works only for storing
Goto Forum:
  


Current Time: Thu Aug 21 10:27:21 CEST 2025

Total time taken to generate the page: 0.05850 seconds