List fileName into a text file

Advertisement

gautammca1
Joined:
Posts:
1
Location:
dubai

List fileName into a text file

Hello All,
I have a requirement to read the file names from SFTP folder and write into a local directly./ Please, can someone advise a simple way to do it from the command line?

I have tried in this way but the output is not as per expectation.

winscp.com userName:passworddxbegap131dv /script=dolist.txt > file.txt.

The output from script:-

Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.
Searching for host...
Connecting to host...
Authenticating...
Using username "HRAppoint_Staging".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] HRAppoint_Staging@dxbegap131dv

Ex[pected output -

DT_TLEO_HRDB_APPL_SYSTEM_20190211T211505.csv
DT_TLEO_HRDB_NHBD_SYSTEM_20190212T153123.csv
DT_TLEO_HRDB_NHEX_SYSTEM_20190207T185335.csv
DT_TLEO_HRDB_NHEX_SYSTEM_TEST.csv

Please advise!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum