[quote=471828:@Tim Hare]If the path is good, DN should not be nil. Are there any special characters in the path, or spaces?
What about
dim DN as FolderItem
DN = GetFolderItem(path)
DN = DN.child("2_doc")
DN = DN.child("Deployment_notes.txt")
Do you get a non-nil DN? If not, which line fails?
To take another tack, you say that the folder is being created. Can you pass that folderitem into this code and use it just like you would user specialfolder? Also, what does the code look like that creates the folder on the network share?[/quote]
DN = DN.child(“2_doc”) fails.
Here’s the whole code. Basically, the user will fill in three fields, which will create the path structure, and then any text they write into the TextArea would be inserted into a newly created “Deployment_notes.txt” at the same time in the “2_doc folder”.
[code] dim VENDOR_NAME as string
VENDOR_NAME =VENDOR_TEXTFIELD.text
dim PRODUCT_NAME as string
PRODUCT_NAME =PRODUCT_TEXTFIELD.text
dim VERSION_NUMBER as string
VERSION_NUMBER=VERSION_TEXTFIELD.text
Dim PATH as String
PATH ="""\\ANDC1WAPP0050.DS.SJHS.COM\source$\software" + VENDOR_NAME + “” + PRODUCT_NAME + “” + VERSION_NUMBER + “”
dim s as new Shell
s.Execute ("mkdir " + path + “\1_Orig_media”)
s.Execute ("mkdir " + path + “\2_Doc”)
s.Execute ("mkdir " + path + “\3_Packaging_work”)
s.Execute ("mkdir " + path + “\4_Deployment”)
dim DOC_PATH as string
DOC_PATH =path + “\2_Doc”
Dim DN As FolderItem
DN = GetFolderItem(DOC_PATH +"\Deployment_notes.txt")
Dim t as TextOutputStream
t = TextOutputStream.Append(DN)
t.Writeline(DEPLOYMENT_TEXTAREA.text)
t.Close[/code]
Hope that helps.