MacSFTP Can't Create Directory
MacSFTP Can't Create Directory
- Subject: MacSFTP Can't Create Directory
- From: Matthew Galaher <email@hidden>
- Date: Thu, 22 Jan 2004 09:52:44 -0800
I've written a script to automatically open a transfer window at the
appropriate job number based off my work flow. What I would like is for
it to create the directory if it does not exist yet based on a variable
call theJobNumber which would contain the name of the directory to
create inside the current directory.
The following script works up to the point where I have to create a new
directory. I have tried working from the sample scripts that come with
MacSFTP but when using the setTellTarget, I get errors such as "dirPath
does not understand Create Directory" often accompanied by MacSFTP
crashing. Or I "set targ to make new transfer window given url:my_ftp"
and then later in the script I get an error such as "variable targ not
defined".
Any help would be much appreciated. TIA
tell application "MacSFTP Carbon"
activate
set theJobNumber to "123"
set the clientName to "abc"
set myUser to "xxx"
set myPassword to "xxx"
set myHost to "server.domain.com"
set myURL to "
ftp://" & myUser & ":" & myPassword & "@" & myHost & "/"
set dirPath to "blah/blah/blah/foo/bar/etc"
set my_ftp to myURL & dirPath & "/" & clientName & "/" & theJobNumber
try
make new transfer window given url:my_ftp
on error
try
display dialog "Directory " & theJobNumebr & " does not exist. Would
you like to make it?"
set my_new_ftp to myURL & dirPath & "/" & clientName
make new transfer window given url:my_new_ftp
--the following part is where I fail. Any suggestions or insights
greatly appreciated.
Create directory theJobNumebr
end try
end try
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.