Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

creating subfolders

DonotaloDonotalo Member Posts: 715
[purple]can anyone please give me a piece of code of creating subfolders if do not exist using windows api? i'm unable to create subfolders using CreateFolder() function. i'm confused about how to use it.[/purple]
[hr][purple]~Donotalo()[/purple]

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : [purple]can anyone please give me a piece of code of creating subfolders if do not exist using windows api? i'm unable to create subfolders using CreateFolder() function. i'm confused about how to use it.[/purple]
    : [hr][purple]~Donotalo()[/purple]
    :
    [blue]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shcreatedirectoryex.asp[/blue]
  • DonotaloDonotalo Member Posts: 715
    : : [purple]can anyone please give me a piece of code of creating subfolders if do not exist using windows api? i'm unable to create subfolders using CreateFolder() function. i'm confused about how to use it.[/purple]
    : : [hr][purple]~Donotalo()[/purple]
    : :
    : [blue]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shcreatedirectoryex.asp[/blue]
    :
    [purple]ok. i followed the page and still cannot create a folder. i've included libshell32.a library (which is equivalent to shell32.dll i think) to compile my project in dev c++. here is the code i'm trying:
    [code]
    #include
    #include
    using namespace std;

    int main()
    {
    int r;

    r = SHCreateDirectoryEx(0, "A\B", 0);

    system("PAUSE");
    return 0;
    }
    [/code]
    and here is the error:
    [red]`SHCreateDirectoryEx' undeclared (first use this function) [/red]
    what i'm doing wrong?

    also, the page u gave states that SHCreateDirectoryEx() will return ERROR_BAD_PATHNAME when the given folder name is a relative folder. but i need to create relative folder. how? please show me.
    [/purple]
    [hr][purple]~Donotalo()[/purple]

  • DonotaloDonotalo Member Posts: 715
    [b][red]This message was edited by Donotalo at 2006-11-10 6:17:22[/red][/b][hr]
    [purple]i've got the function i need: CreateDirectory(). now i need to know how to delete a folder or subfolder. how can i do it using windows api? please help.

    Edit: the directory i want to remove may or may not be empty. so only RemoveDirectory() does not help.
    [/purple]
    [hr][purple]~Donotalo()[/purple]



  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : [b][red]This message was edited by Donotalo at 2006-11-10 6:17:22[/red][/b][hr]
    : [purple]i've got the function i need: CreateDirectory(). now i need to know how to delete a folder or subfolder. how can i do it using windows api? please help.
    :
    : Edit: the directory i want to remove may or may not be empty. so only RemoveDirectory() does not help.
    : [/purple]
    : [hr][purple]~Donotalo()[/purple]
    :
    : [blue]Then you have to waste all files in all sub-dirs and only then delete it. No other way to do it.[/blue]
    :
    :

Sign In or Register to comment.