FTP Command fails some of the time

Welcome Forums General PowerShell Q&A FTP Command fails some of the time

This topic contains 1 reply, has 2 voices, and was last updated by

2 years, 8 months ago.

  • Author
  • #48090

    Points: 0
    Rank: Member

    $ftpparmfile =
    $command = 'ftp -v -i -s:$ftpparmfile '
    Invoke-Expression "& $command"

    These lines are used in a powershell script used in a scheduled daily tasks where files are transferred to a banking organisation.
    Most of the time the FTP process is successful, but some of the time it is neither able to FTP any file nor gives any error.

    What i think the problem is that the command timeout is early for ftp and need to increase the time for it it tries to transfer the file.
    I have tried some timeout logic but none of them is working, Please suggest me some ways for to cope up with this!!

  • #48263

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Well, because http://Ftp.exe is an external command (not a PowerShell cmdlet), you're not really looking at a PowerShell problem, or a PowerShell solution. I'm not sure http://Ftp.exe provides a means of increasing the server timeout. All i can think of is either (a) fixing the server so that it responds promptly or (b) getting a better FTP client.

The topic ‘FTP Command fails some of the time’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort