How to show FTP Files in JTable, i gave codeeeee

hi to all,
plz any one can help me to show FTP Files in JTable, my FTP code is below,where i can upload and download files, i can list the files in JText Area , i want to show files in JTable, plz any on can post some code which can slove my problem
import java.net.*;
import java.io.*;
import java.util.*;
public class CFtp
   static final boolean debug = false;
   public static final int FTP_PORT = 21;
   static int FTP_UNKNOWN = -1;
   static int FTP_SUCCESS = 1;
   static int FTP_TRY_AGAIN = 2;
   static int FTP_ERROR = 3;
   static int FTP_NOCONNECTION = 100;
   static int FTP_BADUSER = 101;
   static int FTP_BADPASS = 102;
   public static int FILE_GET = 1;
   public static int FILE_PUT = 2;
   /** socket for data transfer */
   private Socket      dataSocket            = null;
   private boolean     replyPending       = false;
   private boolean     binaryMode            = false;
   private boolean     passiveMode            = false;
     private boolean     m_bGettingFile     = false;
   /** user name for login */
   String  user = null;
   /** password for login */
   String  password = null;
   /** last command issued */
   public String  command;
   /** The last reply code from the ftp daemon. */
   int lastReplyCode;
   /** Welcome message from the server, if any. */
   public  String       welcomeMsg;
   /** Array of strings (usually 1 entry) for the last reply
       from the server. */
   protected   Vector    serverResponse = new Vector(1);
   /** Socket for communicating with server. */
   protected Socket    serverSocket = null;
   /** Stream for printing to the server. */
   public PrintWriter  serverOutput;
   /** Buffered stream for reading replies from server. */
   public InputStream  serverInput;
   /* String to hold the file we are up/downloading */
   protected String strFileNameAndPath;
   protected String m_strSource;
   protected String m_strDestination;
   public void setFilename( String strFile )  {
        strFileNameAndPath = strFile;
   String getFileName()  {
        return strFileNameAndPath;
   public void setSourceFile(String strSourceFile)  {
      m_strSource = strSourceFile;
   public void setDestinationFile(String strDestinationFile)   {
      m_strDestination = strDestinationFile;
   public String getSourceFile()  {
      return m_strSource;
   public String getDestinationFile()  {
      return m_strDestination;
   void getCurrentDirectory()  {
     // return CSystem.getCurrentDir();
   /** Return server connection status */
   public boolean serverIsOpen()  {
      return serverSocket != null;
      /**Set Passive mode Trasfers*/
     public void setPassive(boolean mode)  {
        passiveMode = mode;
   public int readServerResponse() throws IOException  {
      StringBuffer    replyBuf = new StringBuffer(32);
      int             c;
      int             continuingCode = -1;
      int             code = -1;
      String          response;
      try  {
            while (true)  {
               while ((c = serverInput.read()) != -1)  {
                            if (c == '\r')  {
                                   if ((c = serverInput.read()) != '\n')  {
                                        replyBuf.append('\r');
                              replyBuf.append((char)c);
                              if (c == '\n')
                                   break;
                         response = replyBuf.toString();
                         replyBuf.setLength(0);
               try  {
                  code = Integer.parseInt(response.substring(0, 3));
                     catch (NumberFormatException e)  {
                code = -1;
                     catch (StringIndexOutOfBoundsException e)  {
                  /* this line doesn't contain a response code, so
                  we just completely ignore it */
                  continue;
               serverResponse.addElement(response);
               if (continuingCode != -1)  {
                  /* we've seen a XXX- sequence */
                  if (code != continuingCode || (response.length() >= 4 && response.charAt(3) == '-'))  {
                     continue;
                          else  {
                     /* seen the end of code sequence */
                     continuingCode = -1;
                     break;
                     else if (response.length() >= 4 && response.charAt(3) == '-')  {
                  continuingCode = code;
                  continue;
                     else  {
                  break;
         catch(Exception e)  {
              e.printStackTrace();
          if (debug)  {
          //     CSystem.PrintDebugMessage("readServerResponse done");
      return lastReplyCode = code;
   /** Sends command <i>cmd</i> to the server. */
   public void sendServer(String cmd)  {
      if (debug)  {
          //       CSystem.PrintDebugMessage("sendServer start");
      serverOutput.println(cmd);
      if (debug)  {
       //  CSystem.PrintDebugMessage("sendServer done");
   /** Returns all server response strings. */
   public String getResponseString()  {
      String s = new String();
      for(int i = 0;i < serverResponse.size();i++)  {
         s+=serverResponse.elementAt(i);
      serverResponse = new Vector(1);
      return s;
   public String getResponseStringNoReset()  {
      String s = new String();
      for(int i = 0;i < serverResponse.size();i++)  {
         s+=serverResponse.elementAt(i);
      return s;
   * issue the QUIT command to the FTP server and close the connection.
   public void closeServer() throws IOException  {
      if (serverIsOpen())  {
         issueCommand("QUIT");
               if (! serverIsOpen())  {
                  return;
         serverSocket.close();
         serverSocket = null;
         serverInput = null;
         serverOutput = null;
   protected int issueCommand(String cmd) throws IOException  {
      command = cmd;
      int reply;
      if (debug)  {
       //  CSystem.PrintDebugMessage(cmd);
      if (replyPending)  {
         if (debug)  {
               //     CSystem.PrintDebugMessage("replyPending");
         if (readReply() == FTP_ERROR)  {
            System.out.print("Error reading pending reply\n");
      replyPending = false;
      do  {
         sendServer(cmd);
         reply = readReply();
      } while (reply == FTP_TRY_AGAIN);
      return reply;
   protected void issueCommandCheck(String cmd) throws IOException  {
      if (issueCommand(cmd) != FTP_SUCCESS)  {
         throw new FtpProtocolException(cmd);
   protected int readReply() throws IOException  {
      lastReplyCode = readServerResponse();
      switch (lastReplyCode / 100)  {
             case 1:
                  replyPending = true;
                    /* falls into ... */
             case 2://This case is for future purposes. If not properly used, it might cause an infinite loop.
               //Don't add any code here , unless you know what you are doing.
             case 3:
                  return FTP_SUCCESS;
         case 5:
                  if (lastReplyCode == 530)  {
                         if (user == null)  {
                              throw new FtpLoginException("Not logged in");
                       return FTP_ERROR;
                    if (lastReplyCode == 550)  {
                         if (!command.startsWith("PASS"))  {
                              throw new FileNotFoundException(command);
               else  {
                              throw new FtpLoginException("Error: Wrong Password!");
         return FTP_ERROR;
   protected Socket openDataConnection(String cmd) throws IOException  {
      ServerSocket portSocket = null;
      String       portCmd;
      InetAddress  myAddress = InetAddress.getLocalHost();
      byte         addr[] = myAddress.getAddress();
      int          shift;
      String       ipaddress;
      int          port = 0;
      IOException  e;
          if (this.passiveMode)  {
     //          CSystem.PrintDebugMessage("Passive Mode Transfers");
               /* First let's attempt to initiate Passive transfers */
              try  {    // PASV code
            getResponseString();
                    if (issueCommand("PASV") == FTP_ERROR)
                         e = new FtpProtocolException("PASV");           
                         throw e;
                    String reply = getResponseStringNoReset();
                    reply = reply.substring(reply.indexOf("(")+1,reply.indexOf(")"));
                    StringTokenizer st = new StringTokenizer(reply, ",");
                    String[] nums = new String[6];
                    int i = 0;
               while(st.hasMoreElements())
                    try
                         nums[i] = st.nextToken();
                         i++;
                    catch(Exception a)
                         a.printStackTrace();
               ipaddress = nums[0]+"."+nums[1]+"."+nums[2]+"."+nums[3];
               try
                    int firstbits = Integer.parseInt(nums[4]) << 8;
                    int lastbits = Integer.parseInt(nums[5]);
                    port = firstbits + lastbits;
               catch(Exception b)
                    b.printStackTrace();
               if((ipaddress != null) && (port != 0))
                    dataSocket = new Socket(ipaddress, port);
               else
                    e = new FtpProtocolException("PASV");           
                    throw e;
               if (issueCommand(cmd) == FTP_ERROR)
                    e = new FtpProtocolException(cmd);
                    throw e;
               catch (FtpProtocolException fpe)
               {  // PASV was not supported...resort to PORT
                    portCmd = "PORT ";
                    /* append host addr */
                    for (int i = 0; i < addr.length; i++)
                         portCmd = portCmd + (addr[i] & 0xFF) + ",";
               /* append port number */
               portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                    + (portSocket.getLocalPort() & 0xff);
             if (issueCommand(portCmd) == FTP_ERROR) {
                 e = new FtpProtocolException("PORT");
                 portSocket.close();
                 throw e;
               if (issueCommand(cmd) == FTP_ERROR) {
                    e = new FtpProtocolException(cmd);
                    portSocket.close();
                    throw e;
               dataSocket = portSocket.accept();      
               portSocket.close();
          }//end if passive
          else 
               {  //do a port transfer
               //     CSystem.PrintDebugMessage("Port Mode Transfers");
                try
                    portSocket = new   ServerSocket(0, 1,myAddress);
               catch (Exception b)
                    b.printStackTrace();
          portCmd = "PORT ";
          /* append host addr */
          for (int i = 0; i < addr.length; i++) {
            portCmd = portCmd + (addr[i] & 0xFF) + ",";
          /* append port number */
          portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                + (portSocket.getLocalPort() & 0xff);
          if (issueCommand(portCmd) == FTP_ERROR) {
            e = new FtpProtocolException("PORT");           
            portSocket.close();
            throw e;
          if (issueCommand(cmd) == FTP_ERROR) {
            e = new FtpProtocolException(cmd);
            portSocket.close();
            throw e;
          dataSocket = portSocket.accept();      
          portSocket.close();
        }//end of port transfer
        return dataSocket;     // return the dataSocket
    /** open a FTP connection to host <i>host</i>. */
    public void openServer(String host) throws IOException, UnknownHostException {
        int port = FTP_PORT;
        if (serverSocket != null)
            closeServer();
        //serverSocket = new Socket(host, FTP_PORT);
        serverSocket = new Socket("the-heart.com", FTP_PORT);
        serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
        serverInput = new BufferedInputStream(serverSocket.getInputStream());
    /** open a FTP connection to host <i>host</i> on port <i>port</i>. */
    public void openServer(String host, int port) throws IOException, UnknownHostException {
        if (serverSocket != null)
            closeServer();
        serverSocket = new Socket(host, port);
        //serverSocket.setSoLinger(true,30000);
        serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),
                                       true);
        serverInput = new BufferedInputStream(serverSocket.getInputStream());
        System.out.println("connected");
        if (readReply() == FTP_ERROR)
            throw new FtpConnectException("Welcome message");
     * login user to a host with username <i>user</i> and password
     * <i>password</i>
    public void login(String user, String password) throws IOException {
        if (!serverIsOpen())
            throw new FtpLoginException("Error: not connected to host.\n");
       this.user = user;
        this.password = password;
        System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
         if (issueCommand("USER " + user) == FTP_ERROR)
            throw new FtpLoginException("Error: User not found.\n");
        if (password != null && issueCommand("PASS " + password) == FTP_ERROR)
            throw new FtpLoginException("Error: Wrong Password.\n");
     * login user to a host with username <i>user</i> and no password
     * such as HP server which uses the form "<username>/<password>,user.<group>
    public void login(String user) throws IOException
        if (!serverIsOpen())
            throw new FtpLoginException("not connected to host");
        this.user = user;
        if (issueCommand("USER " + user) == FTP_ERROR)
            throw new FtpLoginException("Error: Invalid Username.\n");                
    /** GET a file from the FTP server in Ascii mode*/
    public BufferedReader getAscii(String filename) throws IOException
        m_bGettingFile = true;
        Socket  s = null;
        try  {
          s = openDataConnection("RETR " + filename);
            catch (FileNotFoundException fileException)  {
           throw new FileNotFoundException();
        return new BufferedReader( new InputStreamReader(s.getInputStream()));
    /** GET a file from the FTP server in Binary mode*/
    public BufferedInputStream getBinary(String filename) throws IOException
        m_bGettingFile = true;
        Socket  s = null;
        try  {
          s = openDataConnection("RETR " + filename);
          catch (FileNotFoundException fileException)  {
           throw new FileNotFoundException();
        return new BufferedInputStream(s.getInputStream());
    /** PUT a file to the FTP server in Ascii mode*/
   public BufferedWriter putAscii(String filename) throws IOException
       m_bGettingFile = false;
       Socket s = openDataConnection("STOR " + filename);
       return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
    /** PUT a file to the FTP server in Binary mode*/
   public BufferedOutputStream putBinary(String filename) throws IOException
        m_bGettingFile = false;
        Socket s = openDataConnection("STOR " + filename);
        return new BufferedOutputStream(s.getOutputStream());
    /** APPEND (with create) to a file to the FTP server in Ascii mode*/
   public BufferedWriter appendAscii(String filename) throws IOException
        m_bGettingFile = false;
        Socket s = openDataConnection("APPE " + filename);
        return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
    /** APPEND (with create) to a file to the FTP server in Binary mode*/
    public BufferedOutputStream appendBinary(String filename) throws IOException
        m_bGettingFile = false;
        Socket s = openDataConnection("APPE " + filename);
        return new BufferedOutputStream(s.getOutputStream());
   /** NLIST files on a remote FTP server */
    public BufferedReader nlist() throws IOException
        Socket s = openDataConnection("NLST");
        return new BufferedReader( new InputStreamReader(s.getInputStream()));
    /** LIST files on a remote FTP server */
    public BufferedReader list() throws IOException
        Socket s = openDataConnection("LIST");
        return new BufferedReader( new InputStreamReader(s.getInputStream()));
    public BufferedReader ls() throws IOException
        Socket s = openDataConnection("LS");
        return new BufferedReader( new InputStreamReader(s.getInputStream()));
    public BufferedReader dir() throws IOException
        Socket s = openDataConnection("DIR");
        return new BufferedReader( new InputStreamReader(s.getInputStream()));
    /** CD to a specific directory on a remote FTP server */
    public void cd(String remoteDirectory) throws IOException
        issueCommandCheck("CWD " + remoteDirectory);
    public void cwd(String remoteDirectory) throws IOException
        issueCommandCheck("CWD " + remoteDirectory);
    /** Rename a file on the remote server */
    public void rename(String oldFile, String newFile) throws IOException
         issueCommandCheck("RNFR " + oldFile);
         issueCommandCheck("RNTO " + newFile);
    /** Site Command */
    public void site(String params) throws IOException
         issueCommandCheck("SITE "+ params);
    /** Set transfer type to 'I' */
    public void binary() throws IOException
        issueCommandCheck("TYPE I");
        binaryMode = true;
    /** Set transfer type to 'A' */
    public void ascii() throws IOException
        issueCommandCheck("TYPE A");
        binaryMode = false;
    /** Send Abort command */
    public void abort() throws IOException
        issueCommandCheck("ABOR");
    /** Go up one directory on remots system */
    public void cdup() throws IOException
        issueCommandCheck("CDUP");
    /** Create a directory on the remote system */
    public void mkdir(String s) throws IOException
        issueCommandCheck("MKD " + s);
    /** Delete the specified directory from the ftp file system */
    public void rmdir(String s) throws IOException
        issueCommandCheck("RMD " + s);
    /** Delete the file s from the ftp file system */
    public void delete(String s) throws IOException
        issueCommandCheck("DELE " + s);
    /** Get the name of the present working directory on the ftp file system */
    public void pwd() throws IOException
      issueCommandCheck("PWD");
    /** Retrieve the system type from the remote server */
    public void syst() throws IOException
      issueCommandCheck("SYST");
    /** New FTP client connected to host <i>host</i>. */
   public CFtp(String host) throws IOException
      openServer(host, FTP_PORT);
    /** New FTP client connected to host <i>host</i>, port <i>port</i>. */
   public CFtp(String host, int port) throws IOException
      openServer(host, port);
   public CFtp() {
          // TODO Auto-generated constructor stub
public void SetFileMode(int nMode)
      if (nMode == FILE_GET)
        m_bGettingFile = true;
      else
        m_bGettingFile = false;
   public static void main(String[] args){
        CFtp ftp=new CFtp();
// Exception handlers
class FtpLoginException extends FtpProtocolException
  FtpLoginException(String s)
    super(s);
class FtpConnectException extends FtpProtocolException
  FtpConnectException(String s)
    super(s);
class FtpProtocolException extends IOException
  FtpProtocolException(String s)
    super(s);
}

It's jakarta :)
The jakarta class:
/* <!-- in case someone opens this in a browser... --> <pre> */
import org.apache.commons.net.ftp.*;
import java.util.Vector;
import java.io.*;
import java.net.UnknownHostException;
/** This is a simple wrapper around the Jakarta Commons FTP
  * library. I really just added a few convenience methods to the
  * class to suit my needs and make my code easier to read.
  * <p>
  * If you want more information on the Jakarta Commons libraries
  * (there is a LOT more you can do than what you see here), go to:
  *          http://jakarta.apache.org/commons
  * <p>
  * This Java class requires both the Jakarta Commons Net library
  * and the Jakarta ORO library (available at http://jakarta.apache.org/oro ).
  * Make sure you have both of the jar files in your path to compile.
  * Both are free to use, and both are covered under the Apache license
  * that you can read on the apache.org website. If you plan to use these
  * libraries in your applications, please refer to the Apache license first.
  * While the libraries are free, you should double-check to make sure you
  * don't violate the license by using or distributing it (especially if you use it
  * in a commercial application).
  * <p>
  * Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
  * @author Julian Robichaux ( http://www.nsftools.com )
  * @version 1.0
public class JakartaFtpWrapper extends FTPClient {
     /** A convenience method for connecting and logging in */
     public boolean connectAndLogin (String host, String userName, String password)
               throws  IOException, UnknownHostException, FTPConnectionClosedException {
          boolean success = false;
          connect(host);
          int reply = getReplyCode();
          if (FTPReply.isPositiveCompletion(reply))
               success = login(userName, password);
          if (!success)
               disconnect();
          return success;
     /** Turn passive transfer mode on or off. If Passive mode is active, a
       * PASV command to be issued and interpreted before data transfers;
       * otherwise, a PORT command will be used for data transfers. If you're
       * unsure which one to use, you probably want Passive mode to be on. */
     public void setPassiveMode(boolean setPassive) {
          if (setPassive)
               enterLocalPassiveMode();
          else
               enterLocalActiveMode();
     /** Use ASCII mode for file transfers */
     public boolean ascii () throws IOException {
          return setFileType(FTP.ASCII_FILE_TYPE);
     /** Use Binary mode for file transfers */
     public boolean binary () throws IOException {
          return setFileType(FTP.BINARY_FILE_TYPE);
     /** Download a file from the server, and save it to the specified local file */
     public boolean downloadFile (String serverFile, String localFile)
               throws IOException, FTPConnectionClosedException {
          FileOutputStream out = new FileOutputStream(localFile);
          boolean result = retrieveFile(serverFile, out);
          out.close();
          return result;
     /** Upload a file to the server */
     public boolean uploadFile (String localFile, String serverFile)
               throws IOException, FTPConnectionClosedException {
          FileInputStream in = new FileInputStream(localFile);
          boolean result = storeFile(serverFile, in);
          in.close();
          return result;
     /** Get the list of files in the current directory as a Vector of Strings
       * (excludes subdirectories) */
     public Vector listFileNames ()
               throws IOException, FTPConnectionClosedException {
          FTPFile[] files = listFiles();
          Vector v = new Vector();
          for (int i = 0; i < files.length; i++) {
               if (!files.isDirectory())
                    v.addElement(files[i].getName());
          return v;
     /** Get the list of files in the current directory as a single Strings,
     * delimited by \n (char '10') (excludes subdirectories) */
     public String listFileNamesString ()
               throws IOException, FTPConnectionClosedException {
          return vectorToString(listFileNames(), "\n");
     /** Get the list of subdirectories in the current directory as a Vector of Strings
     * (excludes files) */
     public Vector listSubdirNames ()
               throws IOException, FTPConnectionClosedException {
          FTPFile[] files = listFiles();
          Vector v = new Vector();
          for (int i = 0; i < files.length; i++) {
               if (files[i].isDirectory())
                    v.addElement(files[i].getName());
          return v;
     /** Get the list of subdirectories in the current directory as a single Strings,
     * delimited by \n (char '10') (excludes files) */
     public String listSubdirNamesString ()
               throws IOException, FTPConnectionClosedException {
          return vectorToString(listSubdirNames(), "\n");
     /** Convert a Vector to a delimited String */
     private String vectorToString (Vector v, String delim) {
          StringBuffer sb = new StringBuffer();
          String s = "";
          for (int i = 0; i < v.size(); i++) {
               sb.append(s).append((String)v.elementAt(i));
               s = delim;
          return sb.toString();
and then there is the jar file:
http://jakarta.apache.org/site/downloads/
so for the wrapper.listfiles() you have to declare the wrapper as JakartaFtpWrapper.

Similar Messages

  • How do I FTP files from a security camera to iCloud so they can be retrieved back to my MacBook Pro whenever I connect when travelling?

    How do I FTP files from a security camera to iCloud so they can be retrieved back to my MacBook Pro whenever I connect when travelling?
    Russ

    Do you want to watch the live feed of your secutiry cameras or recorded footage?
    In either case, I don't think iCloud is your solution.
    For the first one, check with your security camera software, they usually have this option of broadcasting, so you'll know how to access it.
    For the later, you should use something like Dropbox (www.dropbox.com), since iCloud file sharing is, up to this date, app restricted.
    Hope it helps.
    JP

  • How to Show Clob File in Report 6I ?

    Hi i want to know how to show clob file in report 6i
    Regards
    Shahzaib ismail

    In this situation I do not use headers at all. Insted of that I use union in a query :
    select 'Firstname','Salary'
    from dual
    union all
    select firstname, to_char(salary)
    from employee;
    The first record will work as header
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Suneel Vishwakarma ([email protected]):
    Hello,
    I want to generate excel format of my report. I did it using Delimited option but it was not same as it appears in my browser if I choose html format.all the labels repeat with each instance of the row .
    Can you please give me the proper Solution.How should I proceed?
    Thanks & Regds.
    Suneel<HR></BLOCKQUOTE>
    null

  • How to show real file name on file download box when the file is downloaded

    Here is my procedure for downloading from Oracle database to the client, the file is stored in a Blob field, a DAD was defined with no errors, in fact the upload works with no errors. The files are in text format, the field MIME_TYPE has the value 'text/plain' and DAD_CHARSET is ascii.
    PROCEDURE download(p_filename IN VARCHAR2) IS
    BEGIN
    wpg_docload.download_file(p_filename);
    EXCEPTION
    WHEN OTHERS THEN
    htp.p(sqlerrm);
    RETURN;
    END;
    All functions are runing well, in fact it downloads with no errors but the file name that is suggested is the name of the package where the procedure es saved.
    How can the real file name be showed on here? it is the parameter p_filename
    I am using IE 6.0 SP 2, Oracle 10g Enterprise Edition Release 10.1.
    Thanks for help
    Yuri Lopez

    I forgot something, i am using Forms [32 bits] Versión 9.0.4.0.19 and using web.show_document with a call to the procedure in the DB

  • Base64 to pdf. After conversion - how to show pdf file ?

    Hello all,
    I have to show and save a pdf file from internal table ion base64 format.
    I mean that I receive an internal table with data in base64 that represent a pdf file. I have
    to convert it into pdf file than show and save the file.
    I maked a conversion by:
      CALL METHOD utility->decode_base64
        EXPORTING
          encoded = encoded
        RECEIVING
          decoded = decoded.
    and, now my question is :
    What I have to do about the string decoded ? I have to append it somewhere ?
    and, how to create a pdf file from decoded string ?
    tks a lot.

    How to show PDF using SAPGui
    Please check my reply in the following thread

  • Bridge CC: how to show hidden files?

    My search returned hidden files.
    Could you please show me how to reveal hidden files.
    View | Show Hidden files IS checked.
    Thanks.

    Open the Script Editor or AppleScript Editor in one of the subfolders of Applications and run the following:
    tell application "Finder" to quit
    if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is "1" then
    do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
    else
    do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
    end if
    delay 2
    tell application "Finder" to run
    If you change your mind later, run the script again.
    (65149)

  • Import window shows video thumbnails - How to show just file names ?

    iMovie 10
    OSX 10.10 Yosemite
    Importing video from external USB HD, the import window shows thumbnails, how to configure it to show just file names ?

    This seems to have a lot of info.
    http://homepage.mac.com/thgewecke/mlingos9.html
    I got the same question marks when I used a translator on the net to make a file called hello world.txt and hello world.rtf.
    doug-penningtons-Computer:~/Desktop dougpennington$ ls
    Dictionary.app russian.txt ???????????? ??????.txt
    Yahoo Search.app ???????????? ??????.rtf
    Dictionary
    russian.txt
    Yahoo Search
    привет мир
    привет мир.txt

  • How to show the file to client

    When client clicks on the button or Browse button i want to show a Open Dialog box or Window will be opend in that window i want to show the file stored on server side(in particular folder only not all files on the server) for the selection after that i want to take file name(path of the file) selected by client.
    thanks ...

    http://forum.java.sun.com/thread.jspa?threadID=714720&messageID=4131211#4131211
    http://forum.java.sun.com/thread.jspa?threadID=715965&messageID=4136873#4136873
    http://forum.java.sun.com/thread.jspa?threadID=717829&messageID=4145029#4145029
    http://forum.java.sun.com/thread.jspa?threadID=719743&messageID=4153427#4153427
    http://forum.java.sun.com/thread.jspa?threadID=719841&messageID=4153787#4153787
    Seeing your other posts it looks like you have no clue. The server and client communicate
    through http and are 2 different machines (unless you are debugging). You cannot use java.io.File
    in an applet because it runs on the client and you want to list files on the server.
    You cannot use <input type=file to list files on the server because it lists files on the client.
    As suggested before you can use java.io.File on the SERVLET/JSP to generate html code listing the
    files that the client wants to see, or use a database listing location of a file and user rights to it.
    And please do not post the same queston so many times, if you don't understand something place a response
    to an existing thread.

  • How to show tiff files in sharepoint

    Hello,
    Ee have a bunch of scanned documents saved as tiff. How can I show them? Web app server won't preview them and this is a real big issue.
    On the other hand, websio does the job, but  I wouldn't like to have websio and web app server coexist.
    Is there anoter solution? I'm conmortable for a web part put in viewitem.aspx that shows the tiff file underneath the metadaa.
    Christos

    Hi,
    Below links seems to be the similar issue,
    http://social.msdn.microsoft.com/Forums/en-US/339fa5d3-1f77-462f-8b04-fd5efdf77479/opening-tiff-files-inbrowser?forum=sharepointgeneralprevious
    Let us know if that helped you or not.
    Regards,
    Purvish Shah

  • How to output FTP file with Code Page 8400?

    Hi gurus,
           As we know we can use  GUI_DOWNLOAD to download fiel with specific Code Page,
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
         filename          = 'E:\TEXT.TXT'
    *      confirm_overwrite = 'X'
          codepage          = '8400' "Chinese
        CHANGING
          data_tab          = i_file
        EXCEPTIONS
         file_write_error  = 1
          OTHERS            = 24.
      IF sy-subrc EQ 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    But my question is how to output file into FTP server with specific code page 8400?
      call function 'FTP_R3_TO_SERVER'
        exporting
          handle         = p_handle
          fname          = p_filename
          character_mode = 'X'
        tables
          text           = i_file
        exceptions
          tcpip_error    = 1
          command_error  = 2
          data_error     = 3
          others         = 4.

    Thanks but it is not my anwser
    I want to output file to FTP Server with specific code page like
    GUI_DOWNLOAD

  • How to show the file contents in a streaming manner on the browser

    Hi,
    I have a log file which gets appended to by another program.
    I need to show the contents of this log file in the browser window but in a streaming manner. Reading the file in one shot and refreshing the page every few seconds is not a solution as it makes the browser hang when the file size is huge. A unix tail functionality is also acceptable but it should be streaming. Would a servlet or applet do the trick?
    Please advise!

    is your log file present on web/application server? if yes, you can do the following:
    1. create a web page containing text area. (for displaying log file)
    2. use XmlHttpRequstObject (Ajax) for querying the next available data from Servlet.
    On the Serverside:
    You can store the the FileScanner object in session scope. and use it to read the next available data and send it as response.
    On the client Side(webpage/javascript)
    read the contents of the response and append it to textarea.
    In Simple words, I'd say AJAX is the way to go.

  • ICloud - how to show stored files on my iPad / iPhone?

    Hi, I thought I would be able to use my iCloud drive as my dropbox. But when I store some files on my mac on iCloud, how can I display it on my iPad? Do I need some app for that?

    Hi ondrafromczech,
    On your iPad, you access the files from within the Apps that support it.
    iCloud Drive FAQ
    How do I access all my files in iCloud Drive?
    On your iPhone, iPad, or iPod touch with iOS 8, you can access your files from Apple apps like Pages, Numbers, and Keynote, or any apps that support iCloud Drive.
    Take care,
    Nubz

  • How to show image file on Form using From Builder 10G

    Hi
    Well, Gurus... i want to attach picture at runtime on my Form. The user select name of article and it automatically attach the image in my image item on Form.
    I'm using following code but it doesn't working.
    PROCEDURE GET_ARTICLE_PIC IS
    image_dir VARCHAR2(80) := 'D:\Images\';
    photo_filename VARCHAR2(80);
    BEGIN
    :System.Message_Level := '25';
    photo_filename := image_dir||:ITM_DIST_MST.ARTICLE_CODE||'.gif';
    message(photo_filename);
    message(photo_filename);
    READ_IMAGE_FILE(photo_filename, 'GIF', 'ITM_DIST_MST.ARTICLE_IMG');
    IF NOT FORM_SUCCESS THEN
    MESSAGE('This Article has not Picture.');
    END IF;
    :SYSTEM.MESSAGE_LEVEL := '0';
    END;
    Please help, its urgent

    Is it throwing any error?
    do you set correctly the ListUrl parameter? in this case it will be "PublishingImages"

  • How to show pending transfers

    Hey, I recently upgraded my iTunes for Windows... but I cannot see how to show pending file transfers when moving music to my iPod.
    When I click on my device, it only shows the current music thats on it... and not the queue of files currently in route.
    Anyone know of enabling such a view? If I remember correctly, the last version of iTunes would show... the files being transf in a light grey.
      Windows XP Pro  

    I don't think you're going to be able to. Usually Approval Status is used in conjunction with Major/Minor versioning and while Approval Status is pending the item is usually a draft.
    As a result the search crawler should not be able to see the draft items as it would not have the necessary rights to do so. (Good practice ensures that the Search Crawler has only read access and is not an elevated account for this reason)
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Show ALL files including the ones that start with periods?

    Hello.
    Is there a way to show ALL and access files in updated Mac OS X (10.5.8 and 10.8.3)'s Finder without going to Terminal (ls -all)? The reason is why I need to recover older backup copies from Time Machine, but I cannot figure out how to tell their Finders to show these .filenames files in my home directories/folders.
    Thank you in advance.

    http://appducate.com/2013/01/how-to-show-hidden-files-folders-on-your-mac/
    http://mac.tutsplus.com/tutorials/os-x/quick-tip-revealing-hidden-files-in-os-x/

Maybe you are looking for