The file may be in use by another process on the server, preventing WinSCP from accessing it. How to Fix WinSCP Error Code 4 1. Check Server Disk Space

Attempting to rename a file to a name that is already in use or creating a directory that already exists.

If the server's disk is full, operations will fail with Error 4. General failure, error code 4 moving files - Forum - WinSCP

WinSCP "Error Code 4" is a "General Failure" message typically sent by an SFTP server (most commonly OpenSSH) when it encounters a problem but lacks a more specific protocol code to describe it. While the error often occurs during uploads, it can also disrupt downloads if the server cannot access the source file or if the local destination has issues. Common Causes of WinSCP Error Code 4

The most frequent cause is a full filesystem on the server or the user exceeding their allocated disk quota.

Some servers cannot "move" files between different physical disks or partitions using the SFTP protocol; this requires a copy-then-delete operation instead.

The user account may lack the necessary permissions to read the file (for downloads) or write to the directory (for uploads/moves).