I have a file located in unix command line using 'SecureCRT'. I want to get this file's data in excel so I need a .txt file. I have 'WinSCP' installed aswell.

After I do "more [file name]" it displays all the data I want.

How do I get copy this data in a text file and transferred to my pc.


  • What's your PC O.S.? – tachomi Jan 22 '16 at 15:56
  • @tachomi Windows 7 – Ladiesman191 Jan 22 '16 at 18:23

on the ssh session, run the command :

cat file_name > file_name.txt

start WinSCP

in the host box type the name of the server you are connecting to

in the username box type the name you are using to login to ssh session click connect

it will ask you for your password. Type it in the box

at this point, you should see your home directory contents on the right pane of the WinSCP screen.

Find the file_name.txt you want on excel, drag and drop it on your desktop

It is actually very trivial. Or am I missing something ?

  • Sorry, the winscp part is fine, i am logged in. Its the creating of the file in the unix. So Cat 'file name i want to turn to txt' > 'file name i want to create.txt' Correct? When I cat then paste the file name beside it, it starts to load in SecureCRT, so I dont even get a chance to right the txt file I want to create. – Ladiesman191 Jan 22 '16 at 15:14
  • on your screen type the command I gave above cat file_name > file_name.txt by hand and hit enter. Do not try copy and pasting from here or any other source as secureCRT sometimes put funky characters and cause an unexpected results. If you did this, you should be able to see a file_name.txt file on the winSCP right pane. If not, try refreshing the screen on WinSCP (two semicircle shaped green arrows, if you are using the same version I do) – MelBurslan Jan 22 '16 at 15:28
  • Do I have to be in the same directory in securecrt as i am in Wcp when creating file? It seems to work , i just dont have permission to create new file it seems. – Ladiesman191 Jan 22 '16 at 15:56
  • @Ladiesman191 why do you think you need to create a new file? If you can view the file using more, then it is most likely already a text file (or possibly a compressed text file). If it simply needs a .txt extension in order for your PC OS to recognize it as such, it may be sufficient simply to rename it after copying it over. – steeldriver Jan 22 '16 at 16:31
  • You don't have to be in the same directory but it helps finding it fast on WinSCP. If you can not create files where you are, then try creating the file under /tmp. That directory should be open to a write for everyone. Try this command: cat file_name > /tmp/filename.txt. Then with WinSCP, traverse your way to /tmp to find your newly created file. – MelBurslan Jan 22 '16 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.