SFTP connection script in Filezilla

Solved
aureb09 Posted messages 44 Status Member -  
 slimani -
Hello everyone,

I want to create a small script in PS to launch an automatic SFTP connection in Filezilla when it runs.

While browsing Google, I came across this command that executes an exe, but I'm not quite sure how to specify the SFTP connection details as arguments.


$login_FTP="sftp://ftp.server.fr%22
$user_FTP="user"
$pwd_FTP="password"

Start-Process "C:\Program Files\FileZilla FTP Client\filezilla.exe"



Is this possible in PowerShell or with another language?

Thank you in advance for your help!

2 answers

barnabe0057 Posted messages 14329 Registration date   Status Contributor Last intervention   4 930
 
Hello,

Try putting the URL right after like this:

 Start-Process "C:\Program Files\FileZilla FTP Client\filezilla.exe" sftp://username:password@server:port


ps: this is not a line break, there's just a space between the exe and the URL

Edit: Added the language in the code tags

“Artificial intelligence is defined as the opposite of natural stupidity.”
2
slimani
 

I have the same problem;

what is it (Edit: Added the language in the code tags)??

0
barnabe0057 Posted messages 14329 Registration date   Status Contributor Last intervention   4 930 > slimani
 

It's a moderator who is notifying me that he has edited my message.

0
slimani > barnabe0057 Posted messages 14329 Registration date   Status Contributor Last intervention  
 

Can you please help me to write a script that automates the following tasks;

1- take a file from my machine and transfer it to an SFTP server with a username and password.

So I need the syntax that:

1- retrieves the file from my machine.

2- opens an SFTP session

3- and pastes the file in a location on the SFTP server.

Thank you in advance.

0
aureb09 Posted messages 44 Status Member 2
 
Thank you very much, it's perfect, it works just as I want!
0