CMD - Batch with FTP - Error raising excels (.xlsx) [closed]


The .bat uploads the file but it seems to corrupt it, it marks me that it uploads correctly and I check in the FTP and in fact I see that it has been uploaded but when opening it (downloading it to the PC or opening it with a php library) it says that it can not be read. What will happen?

* If I upload it via filezilla manually there is no problem, but of course, I want to upload it through my bat.

        @echo off
        echo user adminz> ftpcmd.dat
        echo passxxxx>> ftpcmd.dat
        echo cd "/public_html/">> ftpcmd.dat
        echo put "C:\Users\doc.xlsx">> ftpcmd.dat
        echo quit>> ftpcmd.dat
        ftp -n -s:ftpcmd.dat
        del ftpcmd.dat

        timeout /t 10
asked by Energy Panel 25.04.2018 в 17:18

0 answers