12-13-2012, 06:25 PM
Recently, i came across a situation were in i have download the log files from UNIX server and validate the logs using QTP.
I thought it will be helpful to the fellow members as well.
Below are the steps to be followed to download the file from UNIX server,
Step 1: Open notepad, type the following and save it as a text file(Say downloadfromunix.txt)
Step 2:
If you feel that opening command prompt every time is a hassle,
Hope it helps.
Thanks,
Elango
I thought it will be helpful to the fellow members as well.
Below are the steps to be followed to download the file from UNIX server,
Step 1: Open notepad, type the following and save it as a text file(Say downloadfromunix.txt)
Code:
Open 'name of the server'
username
password
cd 'path were the file to be downloaded is present'
get 'name of the file' 'file name with which it will be saved in your system'
bye
E.g.:
Open ABC1234
elango
elango@123
cd /apps/ki01/logs
get systemout.log output.log
bye
In the example above, the systemout.log file will be downloaded and as output.log
Step 2:
Code:
* open command prompt(Start -> Run -> cmd)
* go to the location were the text file is saved (E.g.: If it is saved in d:\unix, type "cd d:\unix" in the command prompt)
* type ftp -s:downloadfromunix.txt
* the file named output.log will be downloaded and saved in "d:\unix" folder
If you feel that opening command prompt every time is a hassle,
Code:
* open notepad
* type ftp -s:downloadfromunix.txt
* Save it with .cmd as extension (e.g.: downloadfromunix.cmd)
* Ensure that both downloadfromunix.cmd and downloadfromunix.txt files are present in the same location
* Double click on the downloadfromunix.cmd file
* It will open command prompt and will download the file to the folder in which downloadfromunix.cmd and downloadfromunix.txt files are present
Hope it helps.
Thanks,
Elango