Making a folder on Windows with Script Scripter
Making a folder on Windows with Script Scripter
Does anyone know how to make a folder via Scripter on Windows? I'm trying to Process.execute with the commands md and mkdir but I'm getting the following error: "Failed to run external process: mkdir".
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Re: Making a folder on Windows with Script Scripter
Command: C:/Windows/System32/cmd.exe
Arguments: /c "mkdir d:\folder"
mkdir runs from within the command prompt, you can't call it directly.
/C Carries out the command specified by string and then terminates
Edit: I misread, thought you was using Execute Command. However via scripting it's the same, call mkdir via cmd.exe.
Edit2: This will do: Process.execute("c:/Windows/System32/cmd.exe /c \"mkdir d:\\folder\"")
Arguments: /c "mkdir d:\folder"
mkdir runs from within the command prompt, you can't call it directly.
/C Carries out the command specified by string and then terminates
Edit: I misread, thought you was using Execute Command. However via scripting it's the same, call mkdir via cmd.exe.
Edit2: This will do: Process.execute("c:/Windows/System32/cmd.exe /c \"mkdir d:\\folder\"")
Re: Making a folder on Windows with Script Scripter
Woah, thanks for that. I there any way of doing this for Mac environments so you can get CLI behavior identical to the normal terminal within Scripter?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Re: Making a folder on Windows with Script Scripter
Not sure, I'm more a Windows guy. Since my Switch is on Windows too I can't really test to figure it out.
Re: Making a folder on Windows with Script Scripter
Doh! Here's a better way using the Switch Directory class:
Code: Select all
if(!thatDir.exists){
thisDir.mkdir(that);
}
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.