I needed to download directory from ftp server modify it and uploaded back to server using powershell. At fist i found that [System.Net.WebRequestMethods+Ftp]::UploadFile and [System.Net.WebRequestMethods+Ftp]::DownloadFile works fine and in real life when my zip file size is bigger it does not work.
I have not found any solution to make it working so I used alternative way to solve it. I have written two batch fildes upload.bat and downlaod.bat and calling these batch files from my PS Script to execute.
Actually if anyone use bat file he/she need not to call the bat file from PS Scripts but in my case after downloading zip file from ftp server I modified many things in the files using powershell and then upload it back to server.
Here are the batch files you can try if needed upload.bat and download.bat
Leave a comment