HT1455 G-4 Showing .DS_Store file ?

I have a .DS_Store file appearing on my desktop.  What is this file and why cant I have trash remove these files?

They're normally hidden part of OSX/HFS+
http://www.macupdate.com/info.php/id/10478
Invisibility Toggler - 1.1...
http://www.versiontracker.com/dyn/moreinfo/macosx/32246
InVisibles - 1.5...
http://www.versiontracker.com/dyn/moreinfo/macosx/14722

Similar Messages

  • Folder problems on external drive, not showing correct file size

    I've run across a strange problem. I'm media managing for a tv show, meaning I'm offloading video from CF cards onto 2 external drives, one is a Drobo Raid (set up for backup) and another is a Lacie rugged drive. After copying the media to both drives, the folder I copy will match, but sometimes as I drill upward in my folder structure, suddenly the file sizes will not match. To be more clear: 2 folders will show differing file sizes, but inside that folder is only another folder,nothing else, which matches across the drives. I've shown all files in finder and there's no hidden files, though sometimes I see the ds_store files are different sizes (8k vs 16k), but that's not always the case. Sometimes if I simply create a new folder and move it's contents into it I can get the folders to match, but sometimes that doesn't work. It's part of my workflow to show that these copies match exactly via screenshots, and although the most important folder (the direct folder holding the footage) always matches, these folder problems are super frustrating as it's not constant, and any workarounds also work inconsistantly.
    I had an accidental disconnect of the Drobo one time, and although none of the data seems to have any problem, I fear it's done something to the directory. The rugged drive is swapped out every few days and the problem seems to be on the Drobo. Because the nature of the data is pretty important, I'm afraid to just try messing around with repairing or other software solutions unless I know it's super safe and won't harm the data.
    I'm at a loss as to what's causing it and at the very least how to avoid it cropping up. Any help or insight would be appreciated!

    I had the same problem with my iMac, first I repaired the disk, then I ejected the disk, restarted, and then reinserted the USB in a different port.  All of my files magically showed up.  I don't know what caused the error but it has been working fine since. 

  • Cocktail utility and .DS_Store file

    I recently installed the trial version of Cocktail based on a suggestion from a reply on an earlier post. After installing, running and restarting there is a new file - .DS_Store - that appears on the desktop. I delete the file and it reappears. The contents is as follows (with Safari running):
    +

    Hi
    The fact that .DS_Store has a . at the beginning means it should be invisible. In Cocktail, you have an option to show invisible files IIRC, turn that off & it should disappear again. It will get recreated as it is a necessary file, read about it at http://en.wikipedia.org/wiki/.DS_Store
    Steve

  • How to make Finder use a copied .DS_Store file?

    Hi,
    since the Finder still does not allow applying view options to multiple folders I tried, yet again, to do this manually:
    Create folder A and populate with stuff
    Create folder B and populate with stuff
    Verify that both folders use the system default folder view options
    Verify that no Finder window shows the contents of A or B
    Change the view options on folder A
    Copy the .DS_Store file from folder A to folder B including the extended attributes
    Kill the Finder
    Open a Finder window in folder B and still it shows the system default view options
    Folder A is still fine
    Steps 6 and 7 were performed and verified in the shell (Terminal) with cp, xattr and kill etc.
    Which process do I need to kill in order for the Finder window of folder B to reflect the copied view options?
    Or is the inital approach of copying a .DS_Store file already wrong, where else are these options stored?
    Thanks

    Hi Guang!
    We faced the same problem with webdynpro. The result of our research was to switch to JSP Dynpage Components to have full control of layout and design. There is no known way to include your own css, since the webdynpro controls use the portal display scheme css classes. You probably can overwrite them with own css, using a combination of css and javascript, but it's a process that will cost you plenty.
    Using Dynpages instead of webdynpro may not be an option in your case, though, depending on what other features of webdynpro you are using.
    Regards,
      Jürgen

  • Finder data not being written to .DS_Store file

    The symptom of the problem I am experiencing is that the position of icons on my desktop (as well as icons in other folders in my home directory, as well as Finder window settings for folder in my home directory) are lost every time I log out. On a subsequent login, all of the icons "reflow" starting from the top right corner of the screen, just below the boot volume icon. I have been able to determine that this has to do with the .DS_Store file(s) in the Desktop folder and other folders of my home directory. If a .DS_Store file exists, the timestamp does not change when I change the icon layout and logout. If I delete the .DS_Store file, it is not re-created.
    In my case, my home directory (and the child Desktop folder) is being mounted off an SMB share on a Windows 2003 server. My Mac is using AD authentication to the same Windows 2003 server, which is the domain controller. I'm logging in with my AD credentials, and my home directory mapping is picked up from the home directory field in AD.
    Now, Googling this problem, I found a lot of people complaining about wanting to suppress the use/creation of the .DS_Store files on Windows network volumes. This led to an Apple KB article (http://support.apple.com/kb/HT1629) on how to modify a default to prevent the creation of .DS_Store files on network volumes--essentially the very behavior I am experiencing. The upshot of the KB article is to us the following command in terminal:
    *defaults write com.apple.desktopservices DSDontWriteNetworkStores true*
    I did a 'defaults read' to confirm this default isn't set on my install of Mac OS X 10.5.6--and it isn't. I then tried using the following variation in the hope I could force the behavior I wanted:
    *defaults write com.apple.desktopservices DSDontWriteNetworkStores false*
    Predictably, this had to effect.
    The upshot is, NONE of the Finder data for files and folders in my home directory (icon positions, Finder view window defaults, etc.) is preserved between logons. And this is driving me nuts! I've spent several hours over the past two evening trying to troubleshoot this, and I've had no luck.
    As a footnote, I'll mention that if I drag a folder from my home directory onto the local hard disk, the .DS_Store file is created/updated and things behave as expected (icon position and Finder window defaults are preserved). But, if I then drag the folder back over to my home directory, the values in the .DS_Store file become "frozen" and don't change.

    Hey, try this:
    1.
    Put a file in a folder on your Desktop.
    Edit: not your Desktop, but rather a typical local home on an HFS+ volume ~/Desktop
    2.
    Use "Get Info" to add a "Comment".
    The comment can be up to somewhere between 700 and 800 characters.
    3.
    Copy the folder to a FAT formatted flash drive, SMB share, etc.
    4.
    Create a new folder on the flash drive.
    5.
    Move the file from the first folder to the second folder.
    Confirm that the "Finder" shows the comment to be there.
    6.
    Quit the "Finder" - in 10.4 and earlier, this action would ensure that all .DS_Store files get updated, including transfer of comments. I.e. don't "relaunch" or "kill", etc. Enable and user the "Quit" menu, or use:<pre>
    osascript -e 'tell application "Finder" to quit</pre>
    7.
    Now where's the comment?
    In step 2, you could also have just created a file on the non-HFS volume and wasted your time typing in a 700 character comment.
    In step 6, a more real-world scenario is ejecting the drive or logging out, but deliberately quitting the "Finder" is the most conservative way to ensure that changes get written to .DS_Store files and comments survive. In 10.5.6, even under these conditions, comments are lost.
    Icon positions and view preferences are one thing, but with comments - that's real user-inputted data that Apple is playing fast and loose with. And if they no longer support comments on non-HFS volumes, the "Finder" shouldn't be showing you the comments when you double-check them in step 5, or allow them to be added in the alternate version of step 2.
    ..."C'mon Apple... what gives here?"...
    Unfortunately, this "Discussions" site is not frequented by Apple devs. Have you considered filing a bug report? I wonder what they would tell you, eg. if the treatment of .DS_Store files actually does turn out to be a bug or is intentional as it suspiciously seems...
    http://developer.apple.com/bugreporter/index.html

  • Blocking or removing .DS_Store files

    Noticed today that when our mac users mount File Folders with webdav, they're littering the .DS_Store files all across the filesystem. They then show up in the web view. Is there a function somewhere to either block the .DS_Store files from being created on the webdav directory, or to hide them if created?
    I know we can go machine to machine and block their creation via a terminal preference setting, and we might do that the next round of imaging, but we've got too many to do in a short amount of time.
    P

    I have not done any configuration of DAV on Tomcat, but I have an idea about
    another way you could do this.
    We use an Apache httpd to reverse-Proxy our HA-Teaming-boxes, and I'm pretty
    confident (means: would have to dig into that to confirm) that in the Apache
    config you are able to filter/drop/ReWrite requests that contain the
    ".DS_Store" value in them.
    To use Apache httpd like that, follow
    http://www.novell.com/documentation/...a/bktg8a9.html
    and just configure one BalancerMember for the Cluster.
    HTH,
    Chris
    On 19.05.2010 22:06, petefuller wrote:
    > Noticed today that when our mac users mount File Folders with webdav,
    > they're littering the .DS_Store files all across the filesystem. They
    > then show up in the web view. Is there a function somewhere to either
    > block the .DS_Store files from being created on the webdav directory, or
    > to hide them if created?
    > I know we can go machine to machine and block their creation via a
    > terminal preference setting, and we might do that the next round of
    > imaging, but we've got too many to do in a short amount of time.
    > P
    >
    >

  • What are .ds_store files and can they be removed?

    What are .ds_store files and can they be removed?

    Probably the easiest way is to use Onyx.
    If you show invisibles you can see ds_store in each folder.
    Open Terminal.app (it's in /Applications/Utilities) and copy & paste this command at the prompt...
    sudo chflags nohidden
    Press return.
    The reverse is
    sudo chflags hidden

  • Is there a way to list all .DS_Store files for selective deletion?

    I routinely run VirusBarrier X6 antivirus software. Every time I do, it gets hung up on a single .DS_Store file for days on end, and I have no way to ascertain where the file is located. I understand that .DS_Store files are hidden and in every folder, so I was wondering if there was a way to list all of them via Spotlight or a Terminal command line. Whenever VirusBarrier has been hung up on a system file in the past, it's been freakishly large. I figured if I could list and sort all of the .DS_Store files, it might help me to pinpoint the one responsible for the hang-up. I know about the Terminal command to show all hidden files, but I do not know how to view them all together in a sortable list by size.
    I am also aware of the Terminal command that deletes all .DS_Store files on your computer, but I've read that it may lead to catastrophic results. I'm not looking to cripple my computer over a virus software hang-up.
    Thank you.

    I'm not looking to cripple my computer over a virus software hang-up.
    The computer is already crippled. Remove the Intego product, which is worse than useless and worse than the imaginary "viruses" would be if they really existed, which they don't, by following the instructions on this page. If you have a different version, the procedure may be different.
    Back up all data before making any changes.

  • Finder dose not show all files

    finder dose not show all files and is not open.
    nothing is shown on the desktop.
    how is it fixed?

    Could be disk corruption or bad perference file (s).
    You may want to run these "standard" fixes if the problem persists.
    1) Check the amount of free space on your harddrive.  You should have a several gigs free.
    2) You should run disk utility
         Macintosh-HD -> Applications -> Utilities -> Disk Utility
         a) verify the disk
         b) update your permissions.
    3) Try a safe boot.
        Shutdown your machine.  Hold down the shift key.  Poweron.  Wait awhile Wait awhile while you harddrive
          is being checked.
        http://support.apple.com/kb/ht1455
    4) Define a new account & see if the problem occurs on that account.

  • System crash after deleting ".DS_Store" files?

    My Finder view options were a bit messed up, so I decided to follow some online advice and delete all ".DS_Store" files on my MBP. I followed instructions on osxdaily.com. Specifically, I typed the following command into Terminal:
    sudo find / -name ".DS_Store" -depth -exec rm {} \;
    After the command finished running I tried to restart the computer but it would just show the grey screen with the Apple logo and the progress indicator and not start up properly. I was able to run Disk Utility and verified the HDD. No errors were displayed. I chose "repair disk" anyway, but the computer still would not start up. Entering safe boot mode didn't work either. In the end, I chose to reinstall OSX 10.8 from the Internet. I didn't want to reinstall a backup from Time Machine because there were some files I hadn't backed up yet.
    Fortunately my MBP seems to be working properly again, but what's weird is that I had to reinstall every single application. The application files were still present in the application folder but their icons were greyed out and they wouldn't launch.
    Does anybody have any idea why this happened? Is it that dangerous to delete ".DS_Store" files? Should I use a different command? I would still like to get rid of those files so I can redefine a default view for all folders.
    And is it normal that if I reinstall OSX I need to reinstall all applications as well?

    Letting something arbitrarily delete every .DS_Store file on your computer invites bad things to happen.
    Running rm is dangerous as is--letting it run rough-shod all over your computer is infinitely dangerous.
    I don't know why there is a .DS_Store file  inside an app package, but removing it "damages" the App just as if some malicious code might write malware into the package. So, it is no mystery why they do not work anymore.
    Deleting specific .DS_Store files in folders is not normally a problem.
    If you have a problem in one folder that doesn't hold its settings, deleting the .DS_Store file is ok.
    Here's how I would do it, though:
    Open the folder and Cmd-F.
    If you don't already, use the Other... option in the Criteria popup to add the System Files and Visibility options to the criteria menu (check the box to include in men).
    Set the Search criteria to System Files are included and Visibility is invisible.
    Type ".DS_Store" in the search field. You should see the .DS_Store file for that folder at the top of the list, and then all the others in the subfolders.
    You can delete it from there.

  • Deleted .DS_Store files, Now my drive is EMPTY! Help!

    In Mac's Terminal application I used a command I found on Adobe's website to delete .DS_Store files because I thought I had some corrupt ones. The command was to delete all of them on the entire machine. Since they are not critical files, I figured what the heck. Well, maybe I typed something wrong. I know Terminal is very touchy (now I know). But all of the files on my external drive are gone. When I double-click the drive icon, the window shows 0 items. Can anyone tell me what went wrong and how to undo the problem. I think all the files are still on the drive, there's just no directory to view them - so it says there's 0 files. Help please!
    Here's the commands I entered in Terminal. Note that the first line is the command that was supposed to erase the .DS_Store files. The second line asked for my password. When I entered it, it may have deleted the files, but then it gave me no new command prompt. So everything you see from the "sudo" on is things I entered trying to get a new prompt. So I think that's where I screwed something up.
    neals-imacs-imac-g5-5:Clients iMac$ sudo find / -name ".DS_Store" -depth -exec rm {} \;
    Password:
    sudo
    sudo ls
    neals-imacs-imac-g5-5:~ iMac$ sudo ls
    neals-imacs-imac-g5-5:Clients iMac$ sudo
    usage: sudo -K | -L | -V | -h | -k | -l | -v
    usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
                { -e file [...] | -i | -s | <command> }
    neals-imacs-imac-g5-5:Clients iMac$ sudo ls
    Password:
    By the way, the Adobe article that showed how to delete the .DS_Store files (in case that helps) is at: http://kb2.adobe.com/cps/168/tn_16831.html

    I just did the same exact thing (but recovered!). I hope you didn't empty your recycle bin/trash yet! Your library information is there - get it out!
    The instructions on the web are a bit obtuse - what you need to do is delete ONLY the "iTunes Music" folder within the default iTunes location; I deleted the ENTIRE "iTunes" folder and saw exactly what you do now. You need to restore the "iTunes Library.itl" and "iTunes Music Library.xml" files, and you'll be back in business.
    Not sure how you'll recover if you can't get those files back...

  • Photoshop CC2014 running under window 8.1.  How do I access mini bridge.  It does not show under FILE or WINDOW-EXTENSIONS.  Works ok with CS6

    Photoshop CC2014 running under window 8.1.  How do I access mini bridge.  It does not show under FILE or WINDOW-EXTENSIONS.  Works ok with CS6

    Photoshop: Spring Cleaning | PHOTOSHOP.COM BLOG

  • 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.

  • Open/Save Dialog does not show new files?

    Say you are working on a logic file in a folder and you have
    a few audio and movie files in that folder, and you launch
    Logic and via the open/save dialog window you add a few
    files to your song and in that dialog window you can see
    all the files in that folder.
    Then, in the Finder you add a few more files and movies to
    that folder and again use the open/save dialog window to
    add more files BUT the new files you added since launching
    logic are NOT SHOWN in the dialog window ! ?
    What's the deal with that?
    Every other app can show files added since the launch of the
    application, why not Logic?
    PowerBook G4 1GHz   Mac OS X (10.3.9)  

    project manager
    um, yeah.
    Should not need the project manager simply to see new files added to a directory in a Open/Save dialog window since last opening the app.
    I did a scan, a extended scan, opened all the little turn down arrows of the
    full path to the directory I knew there to be the new files and yes, Logic
    shows them there in the "Project manager".
    BUT Logic still does not show the files in the Open/Save dialog windows.
    This is strange because even simple app like TextEdit can show
    new files in it's Open/Save dialog function windows without the need of
    a project manager.
    I have to quit and re-launch each time to see any new files?

  • For the first time, I'm trying to use adobe premiere elements10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or

    For the first time, I'm trying to use adobe premiere elements 10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or the codex is not installed. As a test, I created another very small project and get the same error message, when I try to open it. Pls give me a simple answer, a refund or a phone

    mike frischenmeyer
    What computer operating system is your Premiere Elements 10 running on? And, what video card/graphics card does that computer use?
    Is this the first time you are using Premiere Elements 10 or have you worked with it before successfully? There is no easy solution until we
    know the details and troubleshoot to determined what caused the problem.
    1. Can you open a new project?
    2. After you saved/closed the problem project, did you move, delete, or rename any of the files/folder that were related to the source media
    for that project?
    3. Please review the Adobe document on troubleshooting damaged projects.
    Troubleshoot damaged projects | Adobe Premiere Elements
    4. What are the steps that you are using to reopen this saved closed project.
    a. File Menu/Open Project/Name of Project
    b. Other
    Please review and consider and then we can decide what next based on your further details and results..
    Thank you.
    ATR

Maybe you are looking for