Page 1 of 1

Powershell script to automate file transfers.

Posted: 2024-04-11 22:09
by NeedPS
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?

Re: Powershell script to automate file transfers.

Posted: 2024-04-12 04:41
by boco
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.

Re: Powershell script to automate file transfers.

Posted: 2024-04-12 07:47
by botg
The site you linked is complete bogus. Looks AI hallucinated.