Sending files through FTP

task is to take files or folders and ZIP it and send it through FTP.i was able to take the files and folders and zip it ,I was able to connect to FTP server but to send the file what code shoud i use.

Multipost:
http://forum.java.sun.com/thread.jspa?threadID=729985

Similar Messages

  • Sending file through TCP/IP

    Hi all,
    I would like to know whether LabVIEW is able to send file through TCP/IP. Can anyone please enlighten me on this. Thank You
    Rgds 

    Hi taytay,
    Of course it is possible !
    Go to function palette >> Communication >> TCP ; I have never used them but here they are.
    Go to Help >> Find examples.. and search for TCP, you'll find example code
    You can also purchase the "internet toolkit" that provide ready to use FTP VIs to send or copy simple/multiple file(s).
    Hope this helps.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Using wildcards (*) in sender file adapter - FTP type

    Hi guys!
    Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
    I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
    Thanks for info!
    Olian

    Thanks for all replies..
    I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
    *, ., *.dat, ...  nothing like that works..  Just exact file name.
    I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
    Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
    Is there anybody with this experience, that it works?
    Thank you!
    Olian

  • Not able to send file Using FTP in SSIS 2005

    I am using SSIS 2005
    I am trying to send file to ftp server using FTP task in SSIS but i am getting following error.
    Error Message-:An error occurred in the requested FTP operation.
    Detailed Description-:550 /FileName.txt: Access is denied.
    RemotefilePath is /
    I need a advice.
    Thanks in advance.

    I got this error recently from the FTP task in SSIS:
         Unable to send files using "FTP".
    I had everything correct, by the book.  I was trying to send a file, but I got the same error when trying to receive a file. 
    I already verified that I could send the file via command line FTP, so the FTP was not "secure FTP" (which wouldda required FileZilla or WinSCP or something similar) and my credentials were fine. 
    But I still got the above error.  Heck, I was beginning to thing that the FTP task in SQL Server 2008 was broken and just couldn't send files.
    Well, this issue is now resolved.  The problem was in the
    destination folder.  I was assuming that the root folder for my FTP account held the files. 
    So I entered the destination folder as this:   
    /data_in/
    But... the FTP task sees the root folder as one up from that. 
    So I had to use my account name in the path... meaning I had to change the destination folder to this:    
        /myaccountname/data_in/
        (where "myaccountname" was my login to the FTP site.)
    I hope this post helps someone else.
    Donna

  • How can I send files by FTP with Oracle Portal?

    I want to send some file by FTP.
    How can I send files by FTP with Oracle Portal?
    Any ideas?

    Enrique,
    Are you trying to transfer more content from remote locations to expose as items within a portal page? By itself, the Oracle Portal runs within the context of the database so I'm not sure how FTP at the OS level will help. However, if you're attempting to transfer files from a remote PC to upload within the Portal, here are a couple of suggestions.
    Option 1:
    A. Create a portal page.
    B. Convert a region to Items.
    C. When you're challenged to upload a file from the local OS, ensure you've a drive mapped to your remote location and pick the file to upload into the Oracle9iAS Portal.
    Option 2:
    Alternatively, the Oracle9iAS Portal 9.0.2 supports the WebDAV protocol(Web-based Distributed Authoring and Versioning Protocol) allowing endusers with a WebDAV client to upload content into the Portal seamlessly from their desktop.
    Pls. check out:
    http://portalcenter.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/OTN_CONTENT/MAINPAGE/PUBLISH_CONTMGMT/TECHNOTE_WEBDAV.HTML
    Hope that helps!
    Thanks,
    Sudi Narasimhan
    Oracle9iASPortal Partner Management/Development
    I want to send some file by FTP.
    How can I send files by FTP with Oracle Portal?
    Any ideas?

  • Uploding file through FTP

    Hi
    How can i upload file and download file through FTP server .is any body has some sample code.pls help me
    Thanks!!

    I think there one undocumented sun.net.ftp
    U can try with that pkg...Better yet, don't.
    Why Developers Should Not Write Programs That Call 'sun' Packages
    http://java.sun.com/products/jdk/faq/faq-sun-packages.htmlI recommend the Jakarta Commons Net package...
    http://jakarta.apache.org/commons/net/

  • Is it possible to upload large files through FTP to server with iWeb?

    Is it possible to upload large files through FTP to server with iWeb like for example with Cyberduck?
    I don't need to publish website with files, I just need to upload files on server. Can it be done somehow with iWeb?

    Here's some info about FTP...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Upload.html
    Make sure you are allowed to store files on your server. Most hosting services don't allow anything to be stored that can't be accessed via the internet. Check the fine print!

  • I can't send files through bluetooth, but can receive them.

    I can't send files through the bluetooth on my imac 20" any longer...
    I can toggle through all the bluetooth-options though.

    i have exactly the same problem with my macbook, and no solution either...

  • Can anyone help me in sending a file through FTP

    i have written a program to transfer files or directories in zipformat through FTP.i have also installed filezella server to check whether it is working or not.i have connected to filezella server but i am not able to send file.can any one send the code for sending the file.
    i have also tried the jakarta api sendfile ().but in that i don't what is mode means.
    for your reference i am sending the code as far developed.
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipInputStream;
    import org.apache.commons.net.ftp.*;
    import org.apache.commons.net.tftp.*;
    class FTPTransfer
    static public void main(String[]p)
    FTPTransfer ob = new FTPTransfer();
    // ob.Create_Zip_File(new File("outfile.zip"),new File[]{new File("c:\\trialtwo")}, false);
    ob.ftpConnect();
    // connecting to FTP server
    public void ftpConnect()
    boolean error = false;
    FTPClient ftp = null;
    try
    int reply;
    //ftp.connect("ftp.comcast.com");
    ftp = new FTPClient();
    ftp.connect( "localhost",21);
    // ftp.login( username, password );
    System.out.print("reply from FTP Server :"+ftp.getReplyString());
    // After connection attempt, you should check the reply code to verify
    // success.
    reply = ftp.getReplyCode();
    if(!FTPReply.isPositiveCompletion(reply)) {
    ftp.disconnect();
    System.err.println("FTP server refused connection.");
    System.exit(1);
    // ftp.sendFile();
    // transfer files
    // ftp.logout();
    TFTPClient tftp = new TFTPClient();
    System.out.print("before sending");
    tftp.sendFile("c:\\trialtwo\\a-1.txt",1,new FileInputStream("c:\\trialtwo\\a-1.txt"),"localhost",21);
    System.out.print("after sending");
    catch(IOException e)
    error = true;
    e.printStackTrace();
    finally
    if(ftp.isConnected())
    try
    ftp.disconnect();
    catch(IOException ioe)
    // do nothing
    System.exit(error ? 1 : 0);
    //send files
    // filename - The name the remote server should use when creating the file on its file system.
    // mode - The TFTP mode of the transfer (one of the MODE constants).
    // host - The remote host receiving the file.
    //port - The port number of the remote TFTP server.
    private void listContents( File Zip_File, File dir, ZipOutputStream out )
    throws Exception
    String[] files;
    files = dir.list();
    byte[] buf = new byte[1024];
    File[] file = dir.listFiles();
    for (int i = 0; i < file.length; i++) {
    System.out.println("*********** "+file);
    // File f = new File(dir,file[i]);
    try{
    FileInputStream in = new FileInputStream(file[i]);
    out.putNextEntry(new ZipEntry(file[i].getPath()));
    int len;
    while((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    in.close();
    catch(Exception e)
    zipEntry(Zip_File, file[i], out);
    } // end listContents()
    void Create_Zip_File(File Zip_File,File[] To_Be_Zipped_Files,boolean Skip_Dirs)
    try
    // Open archive file
    FileOutputStream stream=new FileOutputStream(Zip_File);
    ZipOutputStream out=new ZipOutputStream(stream);
    for (int i=0;i<To_Be_Zipped_Files.length;i++)
    //if (To_Be_Zipped_Files[i]==null
    // || !To_Be_Zipped_Files[i].exists()
    // || (Skip_Dirs ))
    // continue;
    System.out.println("Adding "+To_Be_Zipped_Files[i].getName());
    zipEntry(Zip_File, To_Be_Zipped_Files[i], out);
    out.close();
    stream.close();
    System.out.println("Finished zipping : "+ Zip_File.getAbsolutePath());
    catch (Exception e)
    e.printStackTrace();
    System.out.println("Error: " + e.getMessage());
    return;
    private void zipEntry(File Zip_File, File file, ZipOutputStream out) throws Exception
    if (file.isDirectory())
    listContents(Zip_File, file, out);
    return;

    You'll stand a better chance of getting help if you're more specific about what problems you're encountering. "Can't send file" doesn't say much.
    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.

  • Sender File Adapter (FTP Protocol)

    Hi Every Body,
    I have a problem in using Sender File Adapter of (FTP Protocol Type)
    I have given all required settings to get connected to the FTP Server.
    When i give ( Source Directory and Exact File Name ex : MDMERP.xml)
    File gets picked up.
    But When i give (Source Directory and Exact File Name ex : *.xml)
    it gives below exception
    Error occurred while connecting to the FTP server "mdmerp6:21": java.net.ConnectException: Connection refused: connect
    Strange any guess !! :(((
    Regards
    Srinivas

    Hi,
    If that is connection error then it should have not allowed to pick up when i have given the specifif file name ,
    .xml is too not working
    my problem all starts if i use other than file name declarartion it throws error
    of below kind
    Error occurred while connecting to the FTP server "mdxxxp6:21": java.net.ConnectException: Connection refused: connect
    Can i use " Advanced Selection of Source File" and make it run\
    With regards
    Srini

  • Sender File Adapter - FTP

    XI is picking up While File is being written in the Specified Directory. XI uses File adapter ( FTP transport Protocal ) . If file being written is very large ( It may take couple of minutes ) XI picks it up in parts for every 1 minute ( It was configured like that ) and try to send over Which is not correct. Is there any workaround to this issue. In PI 7.0, for NFS file system,  SAP included modification check but it doesn't work for ftp file adpater. Basically XI should wait to pickup file until the file written completely in the Source System.
    Anyone have any Idea how to overcome this issue ?

    Hi,
    You could use the Advanced mode checkbox in the file adapter, to specify the time the adapter has to wait, before it checks if the file has been modified.
    In case, the file has been modified, after the adapter read the file, the data in the adapter cache is discarded and the updated/modified file is taken from the source path specified.
    This would work, only if you have not specified "recordsets per message" during content conversion.
    Regards,
    Smitha.

  • SENDER FILE ADAPTER (FTP) ERROR

    Hi,
    Iam getting the following error in sender file adapter:
    Could not process due to error: com.sap.aii.adapter.file.ftp.FTPEx: 550 *** ERROR *** NO BATCHES FOR TRANSMISSION
    Could anyone help me in this.
    Thanks &Regards,
    Kiran

    Hi Kiran,
    This problem is not related to PI but rather related to FTP server settings.
    Try changing the name of the file in your adapter settings to a string without any dots and ".
    Try this and let me know if its successful.
    Regards,
    Divya

  • Sending files through lan

    hi
    i want to send text,audio and video files through LAN by using jmf and tcp/ip protocol
    if any body know the answer pls send me the code as early as possible ..pls......it's urgent for me...
    thanks in advance

    Post your question in the iChat disucssions, or just email the files or put them on a server, etc...

  • Send files through Sockets

    how do i send an entire file through a socket...?
    thank you....

    [http://forums.sun.com/thread.jspa?forumID=11&threadID=390636] this may help you

  • I tried to send "File:  / / / " through messages...

    I tried to send "File: / / / " without quotes to a friend through the messages application which obviously crashed it. Now, however, File: / / /  is saved as a draft message and will crash the messages app upon opening it. Is there a way to delete draft messages outside of the app?
    <Edited by Host>

    In the Finder choose the "Go" menu and press Option followed by selecting the Library. Then go to the Messages folder and remove the files that begin with "chat.db" in their names. Then re-open the Messages program.

Maybe you are looking for

  • Mavericks install and Time Machine backup disk

    Anyone come across this? Trying to install Mavericks and get the message : This disk is used for Time Machine Backups This is my Macbook Pro Hard Drive and my time machine backups are saved to an external drive which was not connected when I was tryi

  • TASK:SILOS:@DAC_SIL_PositionDimension_FULL_TD_CMD

    Hi, Out of 296 tasks I was able to see completed-241 tasks and Failed-1 task (Load position into dimension) and remaining were stopped. When I looked into its log file, saw an error message "Error while executing : INFORMATICA TASK:SILOS:@DAC_SIL_Pos

  • Error Maintaining multi-lingual tables.

    Hello, for past few days i have been stack at this error, can't find the solution. So i am bringing my problem here, hoping for an answer. Platform: Linux Red Hat Enterprise 5 i am on R12.1.3 version and DB: 11g 2 realise. I need to install a Finnish

  • Video Help

    Hello Everyone! Some great info on here. I just purchased a 60g Ipod. I am using Videora Ipod Convertor. Some videos it works perfect others it is causing the audio and video to play at different speeds. I'm sure there is a setting I can change. Anyo

  • CCM 3.1(2) - Call Summary Reports

    Hi, I want the Call summary report i.e. giving the details of date, time, calling Party, Called Party, Number dialed, duration of call etc.... I am unable to generate report in CCM R3.1(2) My email ID is [email protected]