Quantcast
Channel: Pochampalli IT Labs
Viewing all articles
Browse latest Browse all 261

Batch script to copy newman report from windows machine to linux machine

$
0
0

To copy newman html report (or in general any file) from windows machine to linux machine use below batch script. 


PuTTY should be installed in the windows(source machine) and pscp.exe should be there in the installation folder and it does the job of copying files from source to destination. 



REM linux machine details 
@echoonsetSOURCE_DIR=C:\postman\newman\
setUSERNAME=linuxadmin
setPASSWORD=MyPassword#123setLINUX_MACHINE_IP=1.123.4.567setDESTINATION_DIR=/home/%USERNAME%/AutoDrive
setFILE_PATTERN=*SmokeTestsNewmanReport.html*

REM copy files from windows to linux
pscp -pw %PASSWORD%%SOURCE_DIR%%FILE_PATTERN%  \ %USERNAME%@%LINUX_MACHINE_IP%:%DESTINATION_DIR%
timeout /t 15 /nobreak
exit

I hope you find this useful! If you like it, pls do subscribe my YouTube channel for automation or tech updates.

Viewing all articles
Browse latest Browse all 261

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>