Have a George Script Create a New Folder

A forum dedicated to George scripting questions
Post Reply
Kylerk
Posts: 47
Joined: 18 Jun 2011, 13:43

Have a George Script Create a New Folder

Post by Kylerk »

Is it possible for a george script to create a folder to save files into?

Seems like it can only accept paths that already exist.

Thanks

Kyler
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Have a George Script Create a New Folder

Post by Mads Juul »

yes

Code: Select all

tv_WriteTextFile "AskUser"|"Create"|"Append"|"Remove"|"Exists"|"MkDir" Path ["Line to write"]
tv_writetextfile "AskUser" "Message" return "OK" or "Forbiden"

tv_writetextfile "MkDir" FolderPath return "Exists" or FolderPath if Dir is created

tv_writetextfile "Exists" Path return ExistingFolderPath or ""

tv_writetextfile "Remove" Path return ""

and then there's

Code: Select all

tv_readtextfile linenumber filename
return linenumber and line readed or EOF if the linenumber is after the end of the file


TO read a folder use
tv_readtextfile line folderPath
with line = file number

-Mads
Post Reply