winscp

Batch script to watch for changes on FTP server

↘锁芯ラ 提交于 2020-01-01 19:27:17
问题 I want to make a batch script able to listen to my ftp server and download files to my computer every time a new file is uploaded on the ftp server. Any ideas? I use WinSCP. 回答1: You can use WinSCP scripting with its synchronize command: :Loop winscp.com /command ^ "option batch abort" ^ "open <session>" ^ "synchronize local <local directory> <remote directory>" ^ "exit" timeout 10 goto :Loop On Windows XP and older, use ping -n 10 127.0.0.1 instead of timeout 10 . 回答2: Use the /synchronize

Batch File > Javascript > WinSCP > Check if file exists

半世苍凉 提交于 2019-12-30 11:53:28
问题 I have a batch file that will launch a .js file which, via WinSCP, checks if a file exists and returns to the batch file if it does or not. The problem IS: It always returns not found, and I cannot figure out why. I am unsure how to use a wildcard in this scenario. The batch file looks like this: cscript /nologo file.js if errorlevel 1 goto notfound exit :notfound (another script to copy a file over) Only one file can exist on the server at once. So every ten min, this batch file will run,

FTP “Too many parameters for command 'synchronize'” with WinSCP

自古美人都是妖i 提交于 2019-12-29 08:15:18
问题 Trying to automate FTP through the WinSCP script: option block abort option confirm off open ftp://[link to cloud server here] synchronize local (path to local files) /Qty Update exit Session starts and connects but then I get Too many parameters for command 'synchronize' 回答1: If the paths contain spaces, you have to surround them by double-quotes: synchronize local "C:\path to local files" "/Qty Update" Side note: It's option batch abort, not block . Other questions with the same error

WinSCP Issue Grabbing MySQL Database

天大地大妈咪最大 提交于 2019-12-25 07:28:25
问题 I am trying to grab a MySQL database from a Linux box, and, with a little help from others, I have learned that the best way to grab the database is to do a mysqldump command. After looking at the Session.ExecuteCommand function, here is my code so far static void Main(string[] args) { SessionOptions sessionSettings = new SessionOptions { Protocol = Protocol.SCP, HostName = "*****", UserName = "userName", Password = "password", SshHostKeyFingerprint = "ssh-rsa 2048 ******************" };

how to automate the login process for a software using python scripts? [closed]

天大地大妈咪最大 提交于 2019-12-23 06:23:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 days ago . I want to drop a text file in a software`. I have to automate this whole process using python scripts. what are the modules required for this? 回答1: You can use ftplib from standart library. Example: from ftplib import FTP ftp = FTP('ftp.debian.org', user='login', passwd='password') ftp.login() ftp.cmd('youdir')

WinSCP .NET assembly doesn't work on Azure

本秂侑毒 提交于 2019-12-23 05:47:33
问题 I have problem with WinSCP .NET assembly (NuGet plugin) executing on Azure. All is working on localhost , but when I deploy my Web App on Azure I get following error: WinSCP process terminated with exit code -1073741819 and output "", without responding (response log file C:\DWASFiles\Sites\mysite\Temp\wscp573C.00D7BA5D.tmp was not created). This could indicate lack of write permissions to the log folder or problems starting WinSCP itself. 回答1: The -1073741819 translated to hex is C0000005 ,

Automated Synchronisation of server files and local files

血红的双手。 提交于 2019-12-23 04:47:10
问题 Is there any application that does a automated update of the server file and local file? WinSCP does the local to server update and uni directional. Is there any bidirectional application? 回答1: Winscp is bi direcional. I currently use this program to automate a directory of documents to 100+ computers. A simple batch file containing the commands found on this page: http://winscp.net/eng/docs/scriptcommand_synchronize Below,is the batch file I use to accomplish a sync from an ftp server to a

WinSCP .NET assembly - How to set folder permissions after creating directory?

南楼画角 提交于 2019-12-23 04:01:08
问题 I'm building a web site and I want that when a user registers, to create a directory on the SFTP server and put in that directory a new file I'm using WinSCP .NET assembly, and writing C#. I noticed that you are able to set permissions only in the method: Session.PutFiles and not in the method: Session.CreateDirectory Snd so after I create the directory and put the file in it, I cannot access the file because I don't have permissions - I'm accessing the file with the full URL How can I access

How to securely deploy PPK file in WPF C# app?

我的梦境 提交于 2019-12-23 03:45:17
问题 I have a C# app that connects to a SFTP server to transfer log files. The app achieves this by using WinSCP .NET assembly to connect to the server. How do I securely store the .ppk private key file such that the user is not able to take this file to access the SFTP for themselves? http://winscp.net/eng/docs/library#csharp Based on the way the library reference the .ppk , it may not be possible to avoid storing the .ppk file on the local disk during run-time? Thanks in advance. 回答1: There's

Batch file when using WinSCP and command prompt

不想你离开。 提交于 2019-12-23 03:35:17
问题 I am currently writing a script that calls WinSCP, connects an SFTP session, transfers a group of files from a local server to a remote server, closes the connection, then moves the local file to an archive. An alternate acceptable solution would be to copy the file to archive and then delete it from the source directory. The problem I am having is that I can get WinSCP to open, connect and transfer the files, but after that the commands are ignored and I am unable to automate the connection