08-01-2013 02:51 PM
I was wondering if it is possible to create a folder with another folder inside it and save to that folder. I am using LabView2012 to control a Tektronix TDS 7054 O'scope with a GPIB interace. The program I am creating saves a screenshot of the scope in a USB plugged into the scope (E:\).
I can declare the initial directory; FILESYSTEM: MKDIR "E:\; and create a folder inside it and then save the picture inside that folder so the directory path would end up like "E:\folder\file.jpg". What I am looking to do is even more specific and create a folder in a folder to save the file to; "E:\folder1\folder2\file.jpg". any suggestions on how to do this?
08-02-2013 09:06 AM
JakeKing,
Here's a link that might be useful concerning MkDir:
http://www.pcmech.com/article/easily-create-nested-directories-using-mkdir/
08-02-2013 09:26 AM
Just write the full path.The command will create the folder structure.
mkdir "C:\Main Folder\SubFolder\Another Folder\OneMoreFolder\File.jpg"
08-02-2013 02:49 PM
Thank you for your quick replies. However, niether of these things work. I tried just creating more directories with more slashes already. Using Labview with the USB plugged into the tektronix 7054 it will not create more than one directory deep at a time. I even created a smaller program which I attached to make sure nothing else was interfering. FILESYSTEM:MKDIR "E:\folder\test" yields no folder created at all. Only FILESYSTEM:MKDIR "E:\folder" will create something.
While messing with my smaller program I have discovered however, that when I ran the program once with FILESYSTEM:MKDIR "E:\folder" and then ran it again with FILESYSTEM:MKDIR "E:\folder\test", it created a "test" folder inside the "folder" folder. I will try to integrate this into my bigger program, but I'd rather a less cumbersome more elegant solution if anyone is able to find any. Thanks again.