Folders

Posts 1–9 of 9 · Page 1 of 1
Folders
Hey guys, im still a beginner and was wondering how I could create a program that creates an amount of files that the user inputs then creates the files at a directory that the user has chosen

I have successfully created a folder in the project folder but thats about it.

Thanks.

Found this and tried it on a win32 app but it didnt work
Code:
#using <mscorlib.dll>

using namespace System;
using namespace System::IO;

int main() {
    // Specify the directory you want to manipulate.
    String* path = S"c:\\";

    try {
        // Determine whether the directory exists.
        if (Directory::Exists(path)) {
            Console::WriteLine(S"That path exists already.");
            return 0;
        }

        // Try to create the directory.
        DirectoryInfo* di = Directory::CreateDirectory(path);
        Console::WriteLine(S"The directory was created successfully at {0}.",
             __box(Directory::GetCreationTime(path)));

        // Delete the directory.
        di->Delete();
        Console::WriteLine(S"The directory was deleted successfully.");
    } catch (Exception* e) {
        Console::WriteLine(S"The process failed: {0}", e);
    } 
}
Directory::Create(S"C:\\freedompeace");
Managed... ewww
Quote Originally Posted by 'Bruno View Post
Managed... ewww
Idk, if you can even call it that.
Quote Originally Posted by why06 View Post


Idk, if you can even call it that.
Managed is awesome
Quote Originally Posted by freedompeace View Post


Managed is awesome
Quote Originally Posted by Hell_Demon View Post
Emote Spam = Ban.
(But I think it is allowed in this case.)
Thanks guys
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us