troubleshooting Question

Converting simple batch file to PowerShell

Avatar of USGLOBAL
USGLOBALFlag for United States of America asked on
Windows BatchPowershell
5 Comments1 Solution2654 ViewsLast Modified:
I need this batch file process as a PowerShell script... Please..

echo ftp download...
echo off
cls
erase somefile1. 
erase somefile1.z
erase somefile2. 
erase somefile2.z
ftp -s:\testfolder\ftp.in
gzip -d somefile1
gzip -d somefile2

4print -1 -u -fn -s -loren -mf -olpt2: C:\testfolder\somefile2

Copy C:\DDC\somefile2 somefile2.txt

The ftp.in file is the information to log into the FTP server to download the files.

open ftp.anyserver.com
username
password
cd ftp_in
lcd C:\testfolder
binary
prompt n
get somefile1.Z
get somefile2.Z
bye
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros