How to create a new directory/folder<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi
When i run my JMP script it generates a lot of different graph that I save as PNG pictures. I would like JMP to each time I run the script to create a folder named with the date and time that the script is run and save the PNG files in that folder. I have looked around, but could not find anybody doing this from JMP script. Can it be done? If not, is there a workaround?
Best Regards
Tarrild
How to create a new directory/folderGreat! I'll also add a method for JMP 8 users:
kernel32 = LoadDLL("kernel32");
kernel32 << DeclareFunction( "CreateDirectoryW",
Convention( STDCALL ),
Alias( "CreateDirectory" ),
Arg( UnicodeString(260), "Path"), // The directory to create
Arg( IntPtr, ""), // Security descriptor. 0 = default
Returns( int32 )
);
baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");
kernel32 << CreateDirectory(dir,0);
How to create a new directory/folderBrilliant !!!! Just what I needed
How to create a new directory/folderThis is working for me in JMP 9 on Windows.
baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");
CreateDirectory(dir);
John