Hi all I have a problem with a small project I am working on. I use putty tools to do the ssh stuff (net-ssh/scp) doesn't work because of bad ssh server on the target. Anyway here is the code I made so far. cmd = ["pcapdump -cleanup", "pcapdump -start -size=500", "pcapdump -stop", "pcapdump -write"] #Loop throu the commands i = 0 until i == 2 command1 = %x[plink.exe -P #{port} -pw #{pw} #{user}@#{ip} "#{cmd[i]}" < yes.txt] i += 1 end #This is to get the file names command3 = %x[plink.exe -P #{port} -pw #{pw} #{user}@#{ip} "#{cmd3}"] #Grab the file names for downloading and store them in a array output = command3.scan(/"([^"]*)"/) #Count the items in the array puts output howmany = output.count #Fetch the file's i = 0 until i == howmany file = output[i] download = %x[pscp.exe -P #{port} -pw #{pw} #{user}@#{ip}:#{file} .] #download = system("pscp.exe -P #{port} -pw #{pw} #{user}@#{ip}:#{file} .#{file}") puts file puts download i += 1 end now when I run it I get [] surrounding variable file. So I put in some puts to se what the variable is: If1.cap If2.cap scp: [If1.cap]: No such file or directory If1.cap scp: [If2.cap]: No such file or directory If2.cap When the pscp command runs the [] shows but not before or after. How can I remove them? /Fox -- Posted via http://www.ruby-forum.com/.