cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-3856%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ESo%20erstellen%20Sie%20ein%20neues%20Verzeichnis%2FOrdner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3856%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3EHallo%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EWenn%20ich%20mein%20JMP-Skript%20ausf%C3%BChre%2C%20werden%20viele%20verschiedene%20Diagramme%20generiert%2C%20die%20ich%20als%20PNG-Bilder%20speichere.%20Ich%20m%C3%B6chte%2C%20dass%20JMP%20jedes%20Mal%2C%20wenn%20ich%20das%20Skript%20ausf%C3%BChre%2C%20einen%20Ordner%20mit%20dem%20Namen%20und%20dem%20Datum%20und%20der%20Uhrzeit%20der%20Ausf%C3%BChrung%20des%20Skripts%20erstellt%20und%20die%20PNG-Dateien%20in%20diesem%20Ordner%20speichert.%20Ich%20habe%20mich%20umgesehen%2C%20konnte%20aber%20niemanden%20finden%2C%20der%20dies%20%C3%BCber%20ein%20JMP-Skript%20erledigt.%20Kann%20es%20gemacht%20werden%3F%20Wenn%20nicht%2C%20gibt%20es%20eine%20Problemumgehung%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EMit%20freundlichen%20Gr%C3%BC%C3%9Fen%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ETarrild%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3859%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ESo%20erstellen%20Sie%20ein%20neues%20Verzeichnis%2FOrdner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3859%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EGro%C3%9Fartig!Ich%20werde%20auch%20eine%20Methode%20f%C3%BCr%20JMP%208-Benutzer%20hinzuf%C3%BCgen%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CPRE%3Ekernel32%20%3D%20LoadDLL(%22kernel32%22)%3B%3CBR%20%2F%3Ekernel32%20%26lt%3B%26lt%3B%20DeclareFunction(%20%22CreateDirectoryW%22%2C%20%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BConvention(%20STDCALL%20)%2C%20%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BAlias(%20%22CreateDirectory%22%20)%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BArg(%20UnicodeString(260)%2C%20%22Path%22)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2F%2F%20The%20directory%20to%20create%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BArg(%20IntPtr%2C%20%22%22)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2F%2F%20Security%20descriptor.%200%20%3D%20default%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BReturns(%20int32%20)%3CBR%20%2F%3E)%3B%3CBR%20%2F%3E%3CBR%20%2F%3EbaseDir%20%3D%20%22C%3A%5Ctemp%5C%22%3B%3CBR%20%2F%3Edir%20%3D%20baseDir%20%7C%7C%20Substitute(MDYHMS(Today())%2C%20%22%2F%22%2C%20%22-%22%2C%20%22%3A%22%2C%20%22.%22)%3B%3CBR%20%2F%3E%3CBR%20%2F%3Ekernel32%20%26lt%3B%26lt%3B%20CreateDirectory(dir%2C0)%3B%3CBR%20%2F%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3858%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ESo%20erstellen%20Sie%20ein%20neues%20Verzeichnis%2FOrdner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3858%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EBrillant%20!!!!%20Genau%20das%2C%20was%20ich%20brauchte%20%3CSPAN%20__jive_emoticon_name%3D%22happy%22%20__jive_macro_name%3D%22emoticon%22%20class%3D%22jive_macro%20jive_emote%22%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2F4.5.5%2Fimages%2Femoticons%2Fhappy.gif%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3857%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ESo%20erstellen%20Sie%20ein%20neues%20Verzeichnis%2FOrdner%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3857%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EDas%20funktioniert%20bei%20mir%20in%20JMP%209%20unter%20Windows.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CPRE%3EbaseDir%20%3D%20%22C%3A%5Ctemp%5C%22%3B%3CBR%20%2F%3Edir%20%3D%20baseDir%20%7C%7C%20Substitute(MDYHMS(Today())%2C%20%22%2F%22%2C%20%22-%22%2C%20%22%3A%22%2C%20%22.%22)%3B%3CBR%20%2F%3E%3CBR%20%2F%3ECreateDirectory(dir)%3B%3CBR%20%2F%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
tarrild
Level II

How to create a new directory/folder

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

1 ACCEPTED SOLUTION

Accepted Solutions
jschroedl
Staff

How to create a new directory/folder

This is working for me in JMP 9 on Windows.

baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");

CreateDirectory(dir);

John

View solution in original post

3 REPLIES 3
jschroedl
Staff

How to create a new directory/folder

This is working for me in JMP 9 on Windows.

baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");

CreateDirectory(dir);

John

tarrild
Level II

How to create a new directory/folder

Brilliant !!!! Just what I needed

jschroedl
Staff

How to create a new directory/folder

Great!  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);

Recommended Articles