Powershell script to automate file transfers.

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
Message
Author
NeedPS
500 Command not understood
Posts: 1
Joined: 2024-04-11 21:51
First name: John
Last name: Sarapo

Powershell script to automate file transfers.

#1 Post by NeedPS » 2024-04-11 22:09

I'm working on a powershell script to automate file transfers with powershell and windows task scheduler.
Here is the script:

<removed link to bogus content>

#path to filezilla.exe (different from website)
$FileZillaPath="C:\FileZilla-3.66.5\filezilla.exe"

#path to filezilla site-manager.xml that has the SFTP, username, etc.... named SFTP_FileZilla.xml
$SiteManagerPath = "C:\scripts\FileZillaTesting\SFTP_FileZilla.xml"

# path to local and remote file paths
$LocalFilePath = "C:\scripts\*"
$RemoteFilePath = "/folder1/folder2/"
#build command to execute
$Command = "& '$FileZillaPath' --site=$SiteManagerPath --local=$LocalFilePath --remote=$RemotefilePath --upload"

#command execute
Invoke-Expression $Command

There is no "red text" in powershell and the script attempts to process, but I'm getting the error: "Unknown long option 'remote' "

I believe it's refencing the --remote=$RemotefilePath part and does not know what to do with it.
Has anyone seen this?
Attachments
FileZillaError.PNG
FileZillaError.PNG (4.21 KiB) Viewed 258 times
Last edited by botg on 2024-04-12 07:47, edited 2 times in total.
Reason: Removed link to bogus website that reads like AI-hallucinated drivel and is just plain wrong.

User avatar
boco
Contributor
Posts: 26948
Joined: 2006-05-01 03:28
Location: Germany

Re: Powershell script to automate file transfers.

#2 Post by boco » 2024-04-12 04:41

FileZilla cannot do automated transfers, it is not designed for that. Only the paid FileZilla Pro CLI can be scripted, and the script you linked is meant for Pro CLI.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35571
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Powershell script to automate file transfers.

#3 Post by botg » 2024-04-12 07:47

The site you linked is complete bogus. Looks AI hallucinated.

Post Reply