-
is it possible?
Hello there, i have this task at college...i need to write a script with c++. There's this specific folder, where documents are... its like c:\bandau\male\male001\*.* and it goes till male010 folders... the same thingy is with c:\bandau\female\female001\*.* and so on... so i have to make this menu...if you choose 1 - then programme have to write all the male00* directorys...for egz: c:\bandau\male\male001 ; c:\bandau\male\male001 etc.
i wanted to know how to start the script? how do i make it search exact directory for folders, who has "male" in the name?
-
Get a list of directories, search for "male" or "female" in each.
-
how do i get a list? what funcion do i use for it?
-
-
Your first stop should be FindFirstFile, if I'm not mistaken.
-
anon, thank you m8, ill try to find the answer there. But is it possible to make it all very simple?? to do the program as simple as it can be?? to begin with like..if i write a specific location it shows me whats in it?
-
It's just not particularly simple (you might be better off with another language, if it doesn't have to be C++).
If you follow the links from that reference, you might also find snippets how to read the entire contents of a directory.
-
C++ isn't a scripting language. The code you write with C++ is called "code". If you want to write a "script" then you need a scripting language.
If you want to use C++ then it won't be any simpler than the impressions you'll get from the links provided.
-
Alright, thank you guys, ill keep searching for what i need. btw, i'm working with dev c++ and only with console application. sry, i will call it code now. :P if you have any example of code which would show all the content inside a folder, please paste it. thank you