Folder creation from inline code?
-
Hi, Just wondering if anyone can point me to a C++ function or run-time library call that I can use to create a new folder like this: NewFolder("C:\\Engineering Data\\Diagnostic Data\\2004_10_15"); I did find SHFileOperations but that seems to be used for deleting, renaming or moving files. I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Thanks, Robert
-
Hi, Just wondering if anyone can point me to a C++ function or run-time library call that I can use to create a new folder like this: NewFolder("C:\\Engineering Data\\Diagnostic Data\\2004_10_15"); I did find SHFileOperations but that seems to be used for deleting, renaming or moving files. I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Thanks, Robert
How about: CreateDirectory() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createdirectory.asp[^] Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
How about: CreateDirectory() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createdirectory.asp[^] Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.
-
CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.
vcplusplus wrote: CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist. Correct but did you read the initial post? I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist.
If you don't mind the OS restriction, use
SHCreateDirectoryEx()
--Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- -
vcplusplus wrote: CreateDirectory("C:\\Engineering Data\\Diagnostic Data\\2004_10_15") will fail if "C:\\Engineering Data\\Diagnostic Data\\" does not exist. Correct but did you read the initial post? I just need to create a new folder under an already existing folder. The higher folder "Diagnostic Data" as used above will always exist if that matters. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
You're right, my mistake.:(