Topic "Downld files to a UNC Path using /console /script"

Author Message
testit00
[View user's profile]

Joined: 2012-04-27
Posts: 4
Location: NJ
I am getting an error when saving the unc path in the winscp session. What is the command to include in the /script = script.txt to have the files download to a unc path?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
There's no special syntax. Please post your script and the log file or error message.
_________________
Martin Prikryl
testit00
[View user's profile]

Joined: 2012-04-27
Posts: 4
Location: NJ
(We are not able to use the .net libraries with powershell at this point in time and we are not able to upgrade winscp either).


The script is in powershell with variables identifying the download path. The download path where I need the files placed is on a UNC path (\\servername\directory\directory\).


# Get File From Remote Site
.\WinSCP.exe /console userid-incoming@xx.xx.xx.xxx /script=Script.txt /Log="$LogPath\$LogFile"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Obviously I need to see the Script.txt to help you.
_________________
Martin Prikryl
testit00
[View user's profile]

Joined: 2012-04-27
Posts: 4
Location: NJ
script.txt = get *.*
exit


Thats it.
testit00
[View user's profile]

Joined: 2012-04-27
Posts: 4
Location: NJ
Reading your reply made me add lcd to the script.txt.
is it possible to have the files download to 2 destinations?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
So where's your UNC path?
You should use
get *.* \\servername\directory\directory\
Also in general your script is not robust.
Please read guide to scripting:
https://winscp.net/eng/docs/guide_automation
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License