FTP error on downloading files from server

I haven't changed my server settings in quite awhile, but
some time ago, I started getting "FTP errors -- could not get file
xxx.htm", and no further explanation.
I am able to see all my files on the server, and am able to
upload saved files to the server, as well as copy files from my
local hard drive and upload them to the server. The only I can't do
is get any files.
I wrote to my ISP's tech support to check their logs, and all
they saw was that all was well on their end. No permissions issues
or errors reported in their logs.
They asked if I had Passive mode checked -- I did. They
suggested I disable my Firewall -- I don't have one. And that I try
another FTP program. I tried FTP itself in Terminal, and my old
version of GoLive 9. Both were able to get any file I requested,
using the same connection settings and machine.
So they're stumped.
What am I doing wrong?

Hi, Alan--
My ISP checked their logs and found no permissions problems
with any of the files I was attempting to download. I also checked
the DW FTP log (Site-->Advanced-->FTP Log), and I am the only
user who has any permissions on any file or directory, and I am
logged in as my user.
The log shows no attempt at a download being made at all, but
only a LIST command:
> CWD /usr/www/users/grndlvl/commerce/gl
< 250 "/usr/www/users/grndlvl/commerce/gl" is new cwd.
> PASV
< 227 Entering Passive Mode (209,68,2,99,210,107)
> TYPE A
< 200 Type okay.
> LIST
< 150 Data connection accepted from 97.93.92.248:56921;
transfer starting.
< -rw-r--r-- 1 grndlvl users 74417 May 21 2008
CSScriptLib.js
< -rwxr-xr-x 1 grndlvl users 3242 May 21 2008 ccval.php
< -rwxr-xr-x 1 grndlvl users 811 Jul 14 2008 error.php
< -rw-r--r-- 1 grndlvl users 446 May 21 2008 font_set.css
< -rwxr-xr-x 1 grndlvl users 2812 Jun 15 2008
formContent.php
< drwxr-xr-x 2 grndlvl users 2560 May 21 2008 images
< drwxr-xr-x 2 grndlvl users 512 May 21 2008 includes
< -rw-r--r-- 1 grndlvl users 24656 Mar 7 18:23
index.shtml
< -rw-r--r-- 1 grndlvl users 24685 May 25 2008
indexf.shtml
< -rwxr-xr-x 1 grndlvl users 8113 Mar 7 17:57 process.php
< -rwxr-xr-x 1 grndlvl users 8109 Jun 13 2008
processup.php
< -rwxr-xr-x 1 grndlvl users 7976 May 22 2008
processupf.php
< -rwxr-xr-x 1 grndlvl users 5230 Mar 7 18:50 receipt.php
< -rwxr-xr-x 1 grndlvl users 11904 Jun 28 2008
receiptgl.php
< drwxr-xr-x 2 grndlvl users 512 May 21 2008 ssi
< -rwxr-xr-x 1 grndlvl users 368 May 21 2008 sysinfo.php
< drwxr-xr-x 2 grndlvl users 512 May 21 2008 test
< -rwxr-xr-x 1 grndlvl users 1557 May 21 2008 testcc.php
< -rwxr-xr-x 1 grndlvl users 378 May 21 2008 transact.pl
< 226 Listing completed.
And here is the error log:
Started: 3/8/09 4:09 AM
/usr/home/grndlvl/public_html/commerce/gl/ccval.php - error
occurred - An FTP error occurred - cannot get ccval.php.
File activity incomplete. 1 file(s) or folder(s) were not
completed.
Files with errors: 1
/usr/home/grndlvl/public_html/commerce/gl/ccval.php
Finished: 3/8/09 4:09 AM
This is happening for every file and every directory on my
site.
All My Best,
Jeffrey

Similar Messages

  • Access/download file from server.

    have a problem. When I am trying to save/open a file from server(secure) which uses HTTPS, its displaying error message:
    Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
    My code is below. Please help me out.
    Its working with my localhost(http) and with Firefix browser. Its something to do with http and IE 6.
    <java>
    if (!request.getScheme().equals("https"))
    response.setHeader("Pragma", "no-cache");
         String fileName=request.getParameter("instruction");
         //filename = filename.replaceAll( "\\W*", "" ) ;
         String DirName = request.getParameter("directory");
         String value = (DirName+"/"+fileName);
                   File f = new File (value);
                   response.setContentType("application/msword");
                   //set the header and also the Name by which user will be prompted to save
                   response.setHeader("Content-disposition", "attachment; filename=" + fileName);
                   InputStream in = new FileInputStream(f);
                   out.clearBuffer();          
                   int bit = 256;
                   int i = 0;
                   try {
                        while ((bit) >= 0) {
                             bit = in.read();
                             out.write(bit);
                   } catch (IOException ioe) {
                        ioe.printStackTrace(System.out);
                   out.flush();
                   out.close();
                   in.close();     
    </java>

    HI,
    To avoid redirection, Safari users are having good luck with Open DNS Free / Basic
    Carolyn

  • Downloading File from server

    I have written more or less same code like following
    to send file from server to browser in other web applications, where browser displays Save As dialog box
    to the user, but the same code doesn't work with portal.
    following code part of a page flow
    <pre>
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward doUploadFile()
    HttpServletResponse res = this.getResponse();
    res.setContentType("application/x-download");
    String filename="C:\\somefile.pdf";
    File file = new File(filename);
    res.setContentLength((int)file.length());
    res.setHeader("Content-Disposition", "attachment;
    filename=" +filename);
    // Send the file.
    InputStream in=null;
    OutputStream out=null;
    try
    out = res.getOutputStream( );
    in = new BufferedInputStream(
    new FileInputStream(filename));
    byte[  ] buf = new byte[4 * 1024]; // 4K buffer
    int bytesRead;
    while ((bytesRead = in.read(buf)) != -1)
    out.write(buf, 0, bytesRead);
    finally
    if (in != null) in.close();
    if (out!= null) out.close();
    return new Forward("success");
    </pre>
    following is the JSP code to trigger the action of file
    download.
    <pre>
    <netui:form action="doUploadFile">
    <netui:button type="submit" value="Upload File" />
    </netui:form>
    </pre>
    Any clue ?

    Hi,
    Im having exactly the same problem. Did you find a way to do this.
    Thanks Chris

  • Error when downloading application from Server

    Hi,
    I have installed MI Client 7.0 SPS 11 Patch 0 on Symbol Device ;OS Windows Mobile5.0
    i have successfully completed <b>first</b> synchronization .
    After that i assigned Mobile Component to the device and tried synchronizing.
    "Error when downloading application from http://<servername>:50000/meContainerSync/servlet/com.sap.ip.mi.http.MobileComponentServlet?Application=xyz&Type=APPLICATION&Runtime=JSP"
    Pl. suggest
    Note: In NWA under 'Device Maintenance' -> Mobile component
    The state of the aplication is <b>"Deployment Activated"</b>
    rgds,
    Kiran Joshua
    Message was edited by:
            Kiran Joshua

    Hi ALL,
    I resolved it on my own guys !!!
    Actually while downloading server url consists of hostname bcoz the hostfile entry in windows/system32/drivers/etc/hosts was only hostname.
    i entered FQDN name in the hostfile... It WORKED
    Being Saturday and Sunday...i cud not get any help from forums...i was really worried and Guys we need to think on this :-?
    rgds,
    Kiran Joshua

  • Errors when downloading files from web sites

    I cannot download files from Firefox anymore on my home computer. I click on the download link and it takes me to another page that is blank. I can download just fine w/o any problems from my work computer, download box/window appears just fine. I'm using the same Windows 7, Firefox 8.0 program and same website that gives me the error message from my home computer. Is there a pop-up blocker, cookie or plug-in that I need to turn off/on? How do I enable downloads so I can save to my home computer?

    Clear cache and cookies and try again. Also, check your firewall permissions for Firefox 8

  • Code to download file from server

    Hi
    I need some code to download file from a server to a local machine.
    Can anybody help me, PLEASE
    Yohan Shikari

    If i try this :
    try
    //          path where the file is stord
    //          String idocPath = config.getServletContext().getInitParameter("idocPath");
              String idocPath = "C:/";
              String fileName = "http://194.98.51.253/utimaco.cer";
              String filePath = idocPath + "\\" + fileName;
              response.setContentType("APPLICATION/OCTET-STREAM");
              String disHeader = "Attachment;Filename=" + fileName ;
              response.setHeader("Content-Disposition", disHeader);
              File file = new File(filePath);
              FileInputStream fileInputStream = new FileInputStream(file);
              int i;
              while ((i=fileInputStream.read())!=-1)
              response.getOutputStream().write(i);
              response.getOutputStream().flush();
              response.getOutputStream().close();
              fileInputStream.close();
              }catch(Exception e)
              e.printStackTrace();
    I don't understand the "type variable" of response !!!
    Thomas

  • How to download file from server to client's local ??

    How to download a file from the server to the client's local machine in a particular folder without users intervention ie. 'Save As" prompt of the browser should be avoided and if the client clicks on "Download" button, the file should get automaticaly downloaded to say, "c:/reports/' on his/her local machine. This is for Java based web appliaction.

    http://jguru.com/faq/view.jsp?EID=10646

  • Download file from server to Mobile Device

    Hello everyone,
    I would like to know firstly if downloading a file from a server to the Mobile device is possible or not. Secondly, if it is then is there a working example (code) I can use.
    What I need is to simply download a text (.txt) file, nothing fancy :-)
    Thanks,
    TADA

    Hi,
    First of all your mobile device has to support JSR75 (PDA Optional Package for J2ME = File connection & PIM).
    Use following link to read a very useful article at SDN, about this API.
    http://developers.sun.com/techtopics/mobility/apis/ttips/fileconnection/
    There is also the sample code located, you are looking for.
    bye,
    Asghar

  • Issues in Download File from Server to PC

    Hi Experts,
    i am havin requirement to download a File and show it to user in open/Sava dialog box.
    i have tried both way to achieve this.
    1)  cl_wd_runtime_services 2 File Download Elements
    here is coding for cl_wd_runtime_services
      CONCATENATE 'C:\temp\'
                         stru_ctx_resume-cv_language
                         stru_ctx_resume-cv_type
                         stru_ctx_resume-oprn_role
                         lv_version
                          '.pdf' INTO lv_filename.
            lv_filetype = 'application/pdf'.
            lr_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
    Showing Downloaded File to new Window.
            cl_wd_runtime_services=>attach_file_to_response(
              i_filename  = lv_filename
              i_content   = lv_filecontent " Its file Byte Array
              i_mime_type = lv_filetype
              i_in_new_window = abap_false
              i_inplace       = abap_false ).
    Problem Statement: Filedownload is working perfect, the only prolem is that IE give warning message before download, i want to get rid of this warning message so i opted for File Download UI Element.
    2) File Dowload Element:
    i have a file download element in a table collumn, this table is mapped to a node Called CTX_Resume, file download element's data property is mapped to attribute called file_content of type xSTring, this attribute is in node called data which is child node of CTX_Resume.(1:N, Lead Selection True, Singleton True)
    so in summary
    CTX_Resume(Node): Mapped to table
        File_DATA(Sub Node of CTX_Resume): It has Supply methodName: Sup_File_Data
              File_Content(Type Xstring) Mapped to Data property of Filedownload
    Codding at Supply Method is
    METHOD sup_file_data .
    data declaration
      DATA:
        stru_file_data            TYPE wd_this->element_file_data,
        stru_resume           TYPE wd_this->element_ctx_resume,
            lv_filecontent TYPE zall_empprof_file_content,      "#EC NEEDED
            lv_error_text TYPE zall_empprof_error_text,         "#EC NEEDED
    if wd_this->mv_first_time = abap_false.
      CALL METHOD parent_element->get_static_attributes
        IMPORTING
          static_attributes = stru_resume.
      if not stru_resume is INITIAL.
        MOVE stru_resume-cv_version TO lv_version.
      CALL METHOD wd_assist->download_cv
        EXPORTING
          im_doc_id       = stru_resume-doc_id
          im_doc_type     = 'pdf'
          im_doc_version  = stru_resume-cv_version
        IMPORTING
          ex_file_content = lv_filecontent " File Byte Array
          ex_error_text   = lv_error_text.
      IF lv_error_text IS INITIAL.
        move lv_filecontent to stru_file_data-file_content.
      ENDIF.
    else.
      wd_this->mv_first_time = abap_false.
    endif.
      node->bind_structure(
        new_item =  stru_file_data
        set_initial_elements = abap_true ).
    ENDMETHOD.
    Problem Statement: this works perfect only at first time as i cant controll the triggering of Supply method, to get rid of this i want whenever user clicks on File Download Link, it must trigger supply method.
    My table doesnt have selections properites = none.
    hope i have given sufficiant information about the problem,
    please help me....
    Regards
    Manish.
    Edited by: Manish Vijay on Jul 3, 2009 2:28 PM
    Edited by: Manish Vijay on Jul 3, 2009 2:34 PM

    It depends on your browser mime type setting.
    If you donload a doc file for example and the client's browser is set as to open doc files automatically with word application you will not get the save file dialog box.
    Its all dependent on the client machine setting and not on forms.

  • Air download files from server

    I have an Air app that should display a DataGrid with a list of files that can be downloaded from my web server. It works perfect as a Flex program. I get 2 errors that I list at the bottom. I have a downloadFile.as file in a com folder
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection; 
    import mx.rpc.events.ResultEvent; 
    import mx.controls.Alert; 
    import mx.events.ListEvent; 
    Bindable] public var directoryDS:ArrayCollection; 
    Bindable] public var serviceURL:String; 
    Bindable] public var fileIndex:Number;  
    public function initApp():void{
    serviceURL =
    "http://www.youngsmarket.com/directory.cfm"; //Set the URL to the httpservice
    directoryDS =
    new ArrayCollection([]); // This is where the results of the httpservice will end up.
    fileIndex = -1;
    directory_srv.send();
    // Taking the data returned from the httpservice and creating FileDownload objects to populate the directoryDS array collection.
    private function setDataSource(evtObj:Object):void
    var fileDL:DownloadFile; 
    var collection:ArrayCollection = evtObj.directory.file as ArrayCollection; // pass httpservice result into a local scope
    var i:int; 
    //loop over results and create a new DownloadFile object and add it to the directoryDS ArrayCollection
    for (i=0;i < collection.length; i++){
    fileDL =
    new DownloadFile();fileDL._file = collection.getItemAt(i).name;
    fileDL._url =
    "http://www.youngsmarket.com/myFiles/"; // Change this to match your Files directory path.
    fileDL._size = collection.getItemAt(i).size;
    directoryDS.addItem(fileDL);
    ]]>
    </mx:Script>
    <mx:HTTPService  id="directory_srv" url="{serviceURL}" result="setDataSource(event.result)"/>
    <mx:DataGrid  dataProvider="{directoryDS}" id="filesDG" doubleClickEnabled="true" itemDoubleClick="downloadFile()" change="setFileIndex(event.target.selectedIndex);"width="
    100%" height="100%" borderStyle="none" themeColor="#73B9B9">
     <mx:columns>
     <mx:DataGridColumn dataField="_file" headerText="File" minWidth="150" />
     <mx:DataGridColumn dataField="_size" headerText="Size" minWidth="100" />
     </mx:columns>
     </mx:DataGrid>
    Error on this line:   var fileDL:DownloadFile;
    the error is:   Type not found or is not compile time constant: DownloadFile
    the next error is this line:    fileDL = new DownloadFile();
    the error is:     call to a possibly undefined method DownloadFile

    hi,
    where is the import statement for the downloadfile class.....
    David.

  • Download file from server

    Hi All,
    I am creating & storing some PDF files in a folder in the server. I want to give a link in a JSP where the user can download the files fromt he server where it is stored. There are so many ways, please some one enlighten me on this; about which is the best way to do it.. the user should be able to see the dialogue box to save or print the document..
    Thanks a million in advance
    smallpost

    Hi All,
    I am creating & storing some PDF files in a folder
    in the server. I want to give a link in a JSP where
    the user can download the files fromt he server
    where it is stored. Just give the link.
    There are so many ways, please
    some one enlighten me on this; about which is the
    best way to do it.. Just give the link.
    the user should be able to see
    the dialogue box to save or print the document..Why a dialog? Those options (print and save) are available in the Acrobat Reader plug-in.

  • Download Files from Server to Client

    I have a flex application that sends data to a php page that
    then generates a pdf file and returns the name of that file to the
    application. All of that works fine. The problems start when I try
    to then download that file to the client.
    This is the Flex client code:
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var pdfFiles:ArrayCollection;
    private function requestPDFHandler (event:ResultEvent):void
    if( event.result.Files == null ) { /* Table is empty */
    /*Do Nothing*/
    }else if( event.result.Files.File is ObjectProxy ) { /*
    Table has only one record */
    pdfFiles = new ArrayCollection( [event.result.Files.File] );
    }else { /* Table has many records */
    pdfFiles = event.result.Files.File as ArrayCollection;
    downloadPDF();
    private function getPDF():void {
    requestPDF.send();
    import flash.display.Sprite;
    import flash.events.*;
    import flash.net.FileReference;
    import flash.net.URLRequest;
    import flash.net.URLRequestMethod;
    private function downloadPDF():void {
    //trace (pdfFiles.list.getItemAt(0).FileName);
    var DOWNLOAD_URL:String = "
    http://" + dbLoc + "/PDF/tmp/" +
    pdfFiles.list.getItemAt(0).FileName;
    //trace(DOWNLOAD_URL);
    var fr:FileReference = new FileReference();
    var request:URLRequest = new URLRequest();
    request.url = DOWNLOAD_URL;
    //configureListeners(fr);
    fr.addEventListener(Event.CANCEL, cancelHandler);
    fr.download(request,"Product List.pdf");
    private function cancelHandler(event:Event):void {
    trace("cancelHandler: " + event);
    ]]>
    </mx:Script>
    <mx:HTTPService id="requestPDF" url="
    http://{dbLoc}/PDF/MakePDFDoc.php"
    method="POST" result="requestPDFHandler(event)">
    <mx:request xmlns="">
    <ProdGroupID>{cboProdGroup.selectedItem.ID}</ProdGroupID><CurrencyID>{cboCurrency.selecte dItem.ID}</CurrencyID>
    </mx:request>
    </mx:HTTPService>
    <mx:Button x="574" y="804" label="Save as PDF"
    width="144" height="34" fontFamily="Verdana" fontSize="12"
    cornerRadius="12" id="btnSavePDF" enabled="true"
    fillColors="[#33332d, #33332d]" fillAlphas="[1.0, 1.0]"
    color="#ffffff" textRollOverColor="#808080"
    textSelectedColor="#808080" borderColor="#000000"
    mouseUp="getPDF()"/>
    When the button is clicked it sends to the php page fine and
    recieves the name of the file. When it gets to
    "fr.download(request,"Product List.pdf");" in the downloadPDF
    function, the 'fr:FileReference' object gives me this error -
    "Error: Error #2037: Functions called in incorrect sequence, or
    earlier call was unsuccessful.". I don't understand what is causing
    the error. Any suggestions?

    Basically, you can try to:
    1. create a ServerSocket to listen to client request.
    2. once a request is received create a thread to handle that connection.
    3. find out what file does the client want.
    4. read the file into a byte array.
    5. flush the byte array back to the socket back to the client.
    6. once the client receive the content, start writing it to disk.
    You have to look into classes like ServerSocket, Socket, DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, and etc.
    There are other ways to do it.
    Hope this helps.

  • Applet question, how to download resource files from server

    hi,
    i am new at applet world.
    i have an applet that reads some resource, data and configuration files. so i need to download these files from server to client. i did some resarch and could not find how to download files from server in an applet application.
    how can i do this task?
    thank you for your answers.

    You may want to distinguish between 'resources' and data/configuration files.
    'Resources' are non-class files that are part of your application, i.e without them the application would simply not work, just like class files.
    Those are typically images, sounds or resource bundles (GUI elements translated to different languages) that nobody except you, the developer, would touch (when releasing an upgrade or a patch).
    Those should just go into the applet jar or additional jars named in the applet tag.
    Data/configuration files, that may be changed by others than the developers, should be made available through HTTP, just like the applet jar itself. The applet will have (read) access to them using java.net.URLConnection.

  • [HELP] Download file from FTP server

    hi,
    I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
    import java.io.*;
    import java.net.*;
    public class FTPUpload {
    private static final int CTRLPORT = 21;
    private static Socket ctrlSocket;
    private static PrintWriter ctrlOutput;
    private static BufferedReader ctrlInput;
    private static byte[] localHostAddress;
    public final static String DIR = "C:\\zip\\";
    public static void main(String[] args) {
    try {
    String host = "192.168.1.1";
    String loginName = "testuser";
    String password = "password";
    String dirName = "/home/testuser";
    String fileName = "hello.zip";
    ctrlSocket = new Socket(host, CTRLPORT);
    localHostAddress = ctrlSocket.getLocalAddress().getAddress();
    ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
    ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
    ctrlOutput.println("USER " + loginName);
    ctrlOutput.flush();
    ctrlOutput.println("PASS " + password);
    ctrlOutput.flush();
    ctrlOutput.println("CWD " + dirName);
    ctrlOutput.flush();
    ctrlOutput.println("TYPE I");
    ctrlOutput.flush();
    FileInputStream fis = new FileInputStream(DIR + fileName);
    Socket dataSocket = dataConnection("STOR " + fileName);
    OutputStream outstr = dataSocket.getOutputStream();
    int n;
    byte[] buff = new byte[1024];
    while ((n = fis.read(buff)) > 0) {
    outstr.write(buff,0,n);
    dataSocket.close();
    fis.close();
    ctrlOutput.close();
    ctrlInput.close();
    ctrlSocket.close();
    }catch (Exception e) {
    e.printStackTrace();
    private static Socket dataConnection(String ctrlcmd)
    throws IOException,UnknownHostException {
    String cmd = "PORT ";
    ServerSocket serverDataSocket = new ServerSocket(0,1);
    for (int i=0;i<4;i++) {
    cmd = cmd + (localHostAddress[i] & 0xff) + ",";
    cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
    + ","
    + (serverDataSocket.getLocalPort() & 0xff);
    ctrlOutput.println(cmd);
    ctrlOutput.flush();
    ctrlOutput.println(ctrlcmd);
    ctrlOutput.flush();
    Socket dataSocket = serverDataSocket.accept();
    serverDataSocket.close();
    return dataSocket;
    }

    Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...

  • Download file from ftp server

    Can I download files from an ftp server by simply using the ip address or https:// url?    I've only gotten this to work by using the "ftp//:" address in previous projects and I'm not getting this to work in many different attempts. 
    Here is one...
     # FTP Config
    $FTPHost =
    "10.10.10.5"
    $Username =
    "admin"
    $Password =
    "12345678"
    $FTPFile =
    "test.log"
    # FTP Log File Url
    $FTPFileUrl =
    "ftp://" +
    $FTPHost +
    "/" +
    $FTPFile
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()
    # Create FTP Connection
    $FTPRequest =
    [System.Net.FtpWebRequest]::Create("$FTPFileUrl")
    $FTPRequest.Credentials
    = New-Object System.Net.NetworkCredential($Username,
    $Password)
    $FTPRequest.Method =
    [System.Net.WebRequestMethods+Ftp]::DownloadFile
    $FTPRequest.UsePassive
    = $false
    $FTPRequest.UseBinary
    = $true
    $FTPRequest.KeepAlive
    = $false
    # Get FTP File
    $FTPResponse =
    $FTPRequest.GetResponse()
    $ResponseStream =
    $FTPResponse.GetResponseStream()
    $FTPReader =
    New-Object System.IO.Streamreader
    -ArgumentList $ResponseStream
    do
    Write-Host
    $FTPReader.ReadLine()
    while ($FTPReader.ReadLine()
    -ne $null)
    $FTPReader.Close()

    Hi!
    You don't need to specifically use an IP address. E.g can use
    $FTPHost = "myrandomserver.mycompany.com"
    $Username = "admin"
    $Password = "12345678"
    $FTPFile = "test.log"
    # FTP Log File Url
    $FTPFileUrl = "ftp://" + $FTPHost + "/" + $FTPFile

Maybe you are looking for