-- maybe the installation proccess need to check is folder writable, in case you re not admin --for max 2010 below till max 9 , I think fn isFolder folder: = ( local state = false if (paths!=unsupplied and doesFileExist folder) do ( local netFile = dotnetClass "System.IO.File" local fileAttr = netFile.GetAttributes folder local strArr = filterString (fileAttr.ToString()) "," if (strArr.count!=0 ) do ( if ((stricmp strArr[1] "Directory")== 0) do (state=true ) ) ) state ) fn isWritableFolder folder: = ( local fail =false local thePath = dotnetClass "System.IO.Path" local file = dotnetClass "System.IO.File" local fileOption = dotnetClass "System.IO.FileOptions" if (folder==unsupplied ) do return fail if (isFolder paths:folder) do ( try ( fs =file.Create (thePath.Combine #(folder,thePath.GetRandomFileName())) 1 fileOption.DeleteOnClose fs.Dispose();fs.close() fail = true ) catch () ) fail ) --- or for max 2010 above --- iswriteable folder function
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter