can't create a collection of names - Classic ASP (General questions)
Can someone please let me know why i'm having an issue creating an array
This is what i have:
set Sftp = Server.CreateObject( WeOnlyDo.wodSFTPCom.1 )
Sftp.LicenseKey = xxxxxx
Sftp.Timeout = 60
Sftp.Login = xxx
Sftp.Password = xxxxxxxxx
Sftp.HostName = xxxxxxxxx.com
Sftp.Blocking = 1
Sftp.Connect
Sftp.ListNames /ftp/ftpdelivery/dbqa/rk/ON/
x = Trim(Sftp.ListItem)
response.write x = & x 'results in: x = ./ ../ .bash_history 100015_200610111421_4001721_S.XML 100015_200610111442_4001721_M.XML 100015_200610111442_4001721_C.XML
' so i get a value for x that is trimmed
so now i'm going to split the file name at the spaces and create and array of the file names:
myArray = Split(x, )
response.write x: & Ubound(myArray) ' results in x:0 NO array created?
for i = 4 to Ubound(myArray) ' no array so this for loop doesn't function
Response.write myArray(i) & <br>
next
Sftp.Disconnect
Response.Flush
set Sftp = Nothing
* Now if I hard code the string that x is equal to and remove the Sftp stuff, so all i have is plain old fashiioned asp, the array works.
So why won't the array work in the above situation with the Sftp code incorporated?
Thanks[:doh:]