Find File in directory

Is it possible to find in a given folder (folder project) for files by mask?

var folderObj = new Folder (folderName);
if (folderObj){
      var files = folderObj.getFiles();
      for (var i = 0; i < files.length; i++){
          var name = files[i].displayName;
          if (name.indexOf(".txt") != -1){ ........ } //if file name contains ".txt", then .....
          //если имя файла содержит ".txt" то условие будет выполнятся

Similar Messages

  • Finding file within directory

    I'm currently using InDesign CS5.5
    I have an automation script I wrote for datamerge in javascript but I've had trouble finding any references to searching for files with javascript. I'm well aware you can't in javascript for the web but there is server side scripting but can't find where any tutorials are online.
    What im trying to acheive is this line here... but in javascript.
    var rootName = app.doScript('set theFile to (do shell script "ls /Path/To/Folder")', ScriptLanguage.APPLESCRIPT_LANGUAGE);
    now to explain why im using this incase anyone wants this or wants to know... this will give me a list of filenames in a directory..
    I then apply..
    var filename = rootName.split('.').reverse().slice(1).reverse().join('.');
    which strips everything but the name of  the file without the extension.
    Part of my program is.. each csv file that comes in will not have the same name so I use this to get the name and then later apply it to my datasource and for saving out the PDF.
    I'd appreciate if anyone can help me acheive looking for a file within javascript or if they could send me a link to where some documentation is.
    I have tried using getFiles("*.csv") but I get errors.. when I slap an alert after getting the file it shows the file with the entire path and I can't use slice because it doesn't do anything. literally it doesn't slice. This is why I was using applescript. I'm not sure if its more efficient or not to use Javascript for this or Applescript just would like to keep it all one language.
    Eventually I'd like to figure out how to set up a for function or some sort of count to grab only 1 file at a time in the case that 2 files make it to the directory.
    Also if anyone wants the code to do a datamerge and save out to pdf I'll gladly post.
    Thanks

    jtcdesigns1 wrote:
    I'm better at modifying than creating
    Modify this to taste
    filename = fetch_me_a_file ("*.csv");
    if (filename == null)
    alert ("No file found, or user canceled");
    else
    alert (filename);
    function fetch_me_a_file (mask)
    var fileList = Folder.myDocuments.getFiles(mask);
    if (fileList.length == 0)
      alert ("No files found");
      return null;
    if (fileList.length == 1)
      return fileList[0].name;
    var selectedFile = Folder.myDocuments.openDlg("Fetch me a file", mask);
    // Canceled?
    if (selectedFile == null)
      return null;
    return selectedFile.name;
    I was wondering if and how your Split Off Filename line worked, but decided to use this RegExp instead:
    name = filename.replace(/^.+\//, '');
    (replacing everything before and including the final forward slash with nothing) but then I thought, wait a minute. The 'object' returned by both getFiles and by openDlg is not actually a file name -- even though JS conveniently translates it to a fully qualified path when asked --, it's a file object. And a regular File object has this useful property 'name': that's just the file name.

  • How to find files and subdirectories in a directory

    can anyone tell me how to find files and subdirectories in a directory .

    Here's a code snippet,
    http://javaalmanac.com/egs/java.io/TraverseTree.html

  • Cp: com.apple.finder.plist: No such file or directory

    Hello,
    As the title suggest, I'm having a problem with cp.
    As the matter of fact, com.apple.finder.plist is inside the preferences folder but why "No such file or directory"?
    The-Universe:~ LS$ cp com.apple.finder.plist com.apple.dock.plist.bak
    cp: com.apple.finder.plist: No such file or directory
    I learnt this command-line form the "Mac OS X Server Introduction to Command-Line Administration Version 10.6 Snow Leopard", pg 38.
    Thanks!
    Cheers.

    I would suggest having a backup of your whole disk, and particularly of any critical files, before proceeding here.
    The the documentation is assuming that you're defaulted into the expected directory, and the path to the plist directory is discussed in the immediately previous section of the manual you're working with. If you're logged into the user you want to edit, the plist files are here: ~/Library/Preferences/
    So some of the bash-level commands that can be used here (and that you will want to understand) follow:
    ls ~/Library/Preferences/
    ls -alR ~/Library/Preferences/
    cd ~/Library/Preferences/
    ls
    ls com.apple.finder.plist
    cp com.apple.finder.plist com.apple.dock.plist.bak
    The specific error here appears to be that the default directory is not in the expected directory. That's what cp has indicated; that there's no file with the specified filename here. The current directory is what the pwd and cd commands will work with, too. See +man pwd+ and +man cd+ for details.
    The Unix layer is comparatively unforgiving, and it's easy to corrupt a disk with an errant command. And the manual you're reading isn't going to explain what are the basics of the Unix file system organization and the bash shell; that's assumed knowledge for that manual, and outside the scope of what that manual is going to be documenting. Do have a backup of your disk, and of your critical data.

  • Find: stat() error /proc/26354: No such file or directory

    Dear everyone,
    I am using Solaris 10u8 on 02 Sun Fire X4240 servers. I also installed Sun Cluster 3.2u3 and Oracle RAC 10gR2 for these 2 servers.
    When I tried to execute the find command, I receive the result I need. However, in the end of the output, I saw additional lines:
    +# find / -name * log -print | grep samba+
    +/var/svc/log/network-samba:default.log+
    +/var/samba/log+
    +/etc/svc/volatile/network-samba:default.log+
    +{color:#ff0000}find: stat() error /proc/26354: No such file or directory{color}+
    I also tried with less complex syntax but got the same result, for example:
    +# find / -name samba+
    +/var/spool/samba+
    +/var/samba+
    +/usr/sfw/lib/webmin/caldera/samba+
    +/usr/sfw/lib/webmin/mscstyle3/samba+
    +/usr/sfw/lib/webmin/samba+
    +/etc/init.d/samba+
    +/etc/webmin/samba+
    +/opt/SUNWscsmb/samba+
    +{color:#ff0000}find: stat() error /proc/24252: No such file or directory+
    +find: stat() error /proc/24345: No such file or directory{color}+
    I don't know why these unormal outputs appeared. Does anyone know what the problem is here ?
    Any advice from you is appreciated. Thanks for your help and please help me in this case.
    Thanks.
    HuyNQ.

    /proc is a virtual filesystem reperesenting running processes.
    By doing a a find from / your allowing find to pass though /proc.
    Those errors indicate processes that exited while the find was running. So the files suddenly disappeared.
    The errors are harmless. But if possible, try not to allow find to scan /proc.

  • Cannot find real path for '/var/install/Client/DATA_UNITS/HDB_CLIENT_LINUX_X86_64/../install/sdbrun': No such file or directory

    Hi Experts,
    I got the error "cannot find real path for '/var/install/Client/DATA_UNITS/HDB_CLIENT_LINUX_X86_64/../install/sdbrun': No such file or directory" and "Error during execution of HdbCmdClazz section!" during SAP NW 740 HANA installation. I specified the right path for HDB client (see in attachment).
    Any ideas, please?
    Thanks & best regards,
    Sreenu

    The service file is in $srcdir, not $_svnmod/builders/cmake.
    You're using an outdated PKGBUILD template too. The svn source should be included in the source array and not checked out manually during the build process.
    EDIT: since this repository requires authentication, perhaps the correct format won't work.
    Last edited by WorMzy (2015-02-08 23:07:59)

  • Could not find file in Temp directory

    Hey all!
    I received the follwoing error when exporting a report into a pdf file using the ExportToStream method:
    Could not find file "C:\DOCUME1\CHL0337\ASPNET\LOCALS1\Temp\export_e269c3d0-e775-4351-b2ea-09507859a79a.tmp".
    I am using VS 2003 and CR 9.1.5, and I didn't have any problems with this report until I enlarged the header field for a column. After this error occurred, I reverted back to the original report, but it still threw the error. I then restarted IIS, rebuilt the application, and then ran the report again. Still no luck.
    Any ideas on what is causing this problem? Is this a version issue?
    (I have four other reports that are still working fine, it just seems to be this one report)

    Here is the full dump of the error message:
    Exception=System.IO.FileNotFoundException
    Message=Could not find file "C:\DOCUME1\CHL0337\ASPNET\LOCALS1\Temp\export_d03e5522-a635-47c0-b649-a238063b0223.tmp".
    FileName=C:\DOCUME1\CHL0337\ASPNET\LOCALS1\Temp\export_d03e5522-a635-47c0-b649-a238063b0223.tmp
    TargetSite=Void WinIOError(Int32, System.String)
    StackTrace= at System.IO.__Error.WinIOError(Int32 errorCode, String str)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
    at FixedAssets.FAPageBase.InvokeCrystalReport(String ReportName) in c:\dev\source\comptrollers\fixedassets\dev\web\fapagebase.aspx.cs:line 588
    at FixedAssets.Reports.CreateAssetDisposalsReport.btnRunReport_Click(Object sender, EventArgs e) in C:\dev\source\comptrollers\FixedAssets\Dev\web\Reports\AssetDisposalsReport.aspx.cs:line 70
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain()
    Source=mscorlib

  • Searching file from directory located at http path.

    Hi All,
    I have made the program to search for a file in a directory and its subdirectories. This is working fine when my directory is located on local machine. But if the same directory is placed in HTTP path, the code fails to search a directory. Does anyone has idea how can i connect to site so as to access the directories. I used URL and URLConnection to read and write file to the site, and this is also working fine but when it comes to directories i find no solution. Please help.

    This works fine if i map http://flash/ on my C: and
    try to list files in directory C:\Mojo. Can you please
    tell how can i know whether the http server i am
    trying to access allows directory listing or not.
    Because if it does not i have administrator rights on
    the server and i can make the changes required.You can see if your Web server allows directory listing by simply
    typing in the URL you want to examine, inside your browser, and see if
    it shows you a directory listing. For instance, if you type in:
    http://flash/Mojo/
    in your browser's address bar, and you see a list of files in that
    directory, then your Web server supports directory listing.
    Note, though, that you can't use the File list() method to get a list of files.
    You'll have to make a connection, read the input stream, and then parse
    the filenames out of the HTML that the Web server returns. (You can see
    what the HTML looks like, by doing View Source inside your brower. That's
    what you'll get back from your Java program.)
    --Steve

  • Read file from directory, update contents of the each file

    hai,
    I could not understand how to debug the error i have now.
    target
    1- read the files from directory // i able ot do this part
    2- for each file
    for each file read the content & compare with the existing List & update the list // i able to do this part
    when i try to combine both parts , i got some following error
    run:
    E:\java\check\100130.ixf
    Error: children[i] (The system cannot find the file specified)
    BUILD SUCCESSFUL (total time: 2 seconds)
    i can see from the code that children[i] only gives the error when i use that in the second part of the code.
    can any one help me on this??
    Thanks
    Priyan
    the original code
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.InputStreamReader;
    import java.io.RandomAccessFile;
    import java.util.ArrayList;
    public class CompareList
         public static void main(String[] args){
             ArrayList a1 = new ArrayList();
             ArrayList a2 = new ArrayList();
             a1.add("1");
             a1.add("2");
             a1.add("3");
             a1.add("4");
             a1.add("5");
             a1.add("6");
             a1.add("7");
             a1.add("8");
             a1.add("9");
             a1.add("10");
             a1.add("11");
             a1.add("12");
             a1.add("13");
             a1.add("14");
             a1.add("15");
             a1.add("16");
             a1.add("17");
             a1.add("18");
             a1.add("19");
             a1.add("20");
             a1.add("21");
             a1.add("22");
             a1.add("23");
             a1.add("24");
             a1.add("25");
             a1.add("26");
             a1.add("27");
             a1.add("28");
             a1.add("29");
             a1.add("30");
             a1.add("31");
             a1.add("32");
             a1.add("33");
             a1.add("34");
             a1.add("35");
             a1.add("36");
             a1.add("37");
             a1.add("38");
             a1.add("39");
             a1.add("40");
             a1.add("41");
             a1.add("42");
             a1.add("43");
             a1.add("44");
             a1.add("45");
             a1.add("46");
             a1.add("47");
             a1.add("48");
             a1.add("49");
             a1.add("50");
             a1.add("51");
             a1.add("52");
              try{
                    File dir = new File("E:\\java\\check");
                    File[] children = dir.listFiles();
                    if (children == null) {
                          System.out.println("does not exist or is not a directory");
        else {
               for (int i = 0; i < children.length; i++) {
                       System.out.println( children);
    FileInputStream fstream = new FileInputStream("children[i]");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    String strLine;
    while ((strLine = br.readLine()) != null)      {
    String line =strLine.substring(0,2);
    // Print the content on the console
    //System.out.println(line);
    a2.add(line);
    } // end of add list2
    if (a1.size() > a2.size())
    int k = 0;
    for (int l = 0; l < a2.size(); l++)
    if (!((String)a1.get(l)).equals((String)a2.get(l)))
    //System.out.println((String)a2.get(i));
    // System.out.println("dd");
    k = l;
    k++;
    for (int l = k; l < a1.size(); l++)
    System.out.println((String)a1.get(l));
    String str = "children[l]";
    File file = new File(str);
    RandomAccessFile rand = new RandomAccessFile(file,"rw");
    rand.seek(file.length()); //Seek to end of file
    rand.writeBytes((String)a1.get(i)); //Write end of file
    rand.writeBytes("., 0.");
    rand.writeBytes("\n");
    }// end of comparing and updating the list2
              in.close();
    catch (Exception e){//Catch exception if any
    System.err.println("Error: " + e.getMessage());

    thanks for the information.
    i tried, the error
    like this
    run:
    E:\java\check\100130.ixf
    java.lang.StringIndexOutOfBoundsException: String index out of range: 2
            at java.lang.String.substring(String.java:1935) 
            at CompareList.main(CompareList.java:84)
    BUILD SUCCESSFUL (total time: 0 seconds)this comes because in my code i used children[i] as string in the later part
        else {
               for (int i = 0; i < children.length; i++) {
                        System.out.println( children);
    FileInputStream fstream = new FileInputStream(children[i]);
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    String strLine;
    while ((strLine = br.readLine()) != null)      {
    String line =strLine.substring(0,2);
    a2.add(line);
    System.out.println(line);
    } // end of add list2
    if (a1.size() > a2.size())
    int k = 0;
    for (int l = 0; l < a2.size(); l++)
    if (!((String)a1.get(l)).equals((String)a2.get(l)))
    //System.out.println((String)a2.get(i));
    // System.out.println("dd");
    k = l;
    k++;
    for (int l = k; l < a1.size(); l++)
    System.out.println((String)a1.get(l));
    String str = "children[l]";
    File file = new File(str);
    RandomAccessFile rand = new RandomAccessFile(file,"rw");
    rand.seek(file.length()); //Seek to end of file
    rand.writeBytes((String)a1.get(i)); //Write end of file
    rand.writeBytes("., 0.");
    rand.writeBytes("\n");
    rand.close();
    }// end of comparing and updating the list2
              in.close();
    i stil could not figure out it yet. do u have any clue with this.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • "No such file or directory" errors on Time Machine backup volume

    I remotely mounted the Time Machine backup volume onto another Mac and was looking around it in a Terminal window and discovered what appeared to be a funny problem. If I "cd" into some folders (but not all) and do a "ls -la" command, I get a lot of "No such file or directory" errors for all the subfolders, but all the files look fine. Yet if I go log onto the Mac that has the backup volume mounted as a local volume, these errors never appear for the exact same location. Even more weird is that if I do "ls -a" everything appears normal on both systems (no error messages anyway).
    It appears to be the case that the folders that have the problem are folders that Time Machine has created as "hard links" to other folders which is something that Time Machine does and is only available as of Mac OS X 10.5 and is the secret behind how it avoids using up disk space for files that are the same in the different backups.
    I moved the Time Machine disk to the second Mac and mounted the volume locally onto it (the second Mac that was showing the problems), so that now the volume is local to it instead of a remote mounted volume via AFP and the problem goes away, and if I do a remote mount on the first Mac of the Time Machine volume the problem appears on the first Mac system that was OK - so basically by switching the volume the problem switches also on who shows the "no such file or directory" errors.
    Because of the way the problem occurs, ie only when the volume is remote mounted, it would appear to be an issue with AFP mounted volumes that contain these "hard links" to folders.
    There is utility program written by Amit Singh, the fella who wrote the "Mac OS X Internals" book, called hfsdebug (you can get it from his website if you want - just do a web search for "Mac OS X Internals hfsdebug" if you want to find it ). If you use it to get a little bit more info on what's going on, it shows a lot of details about one of the problematic folders. Here is what things look like on the first Mac (mac1) with the Time Machine locally mounted:
    mac1:xxx me$ pwd
    /Volumes/MyBackups/yyy/xxx
    mac1:xxx me$ ls -a
    . .DS_Store D2
    .. Documents D3
    mac1:xxx me$ ls -lai
    total 48
    280678 drwxr-xr-x 5 me staff 204 Jan 20 01:23 .
    282780 drwxr-xr-x 12 me staff 442 Jan 17 14:03 ..
    286678 -rw-r--r--@ 1 me staff 21508 Jan 19 10:43 .DS_Store
    135 drwxrwxrwx 91 me staff 3944 Jan 7 02:53 Documents
    729750 drwx------ 104 me staff 7378 Jan 15 14:17 D2
    728506 drwx------ 19 me staff 850 Jan 14 09:19 D3
    mac1:xxx me$ hfsdebug Documents/ | head
    <Catalog B-Tree node = 12589 (sector 0x18837)>
    path = MyBackups:/yyy/xxx/Documents
    # Catalog File Record
    type = file (alias, directory hard link)
    indirect folder = MyBackups:/.HFS+ Private Directory Data%000d/dir_135
    file ID = 728505
    flags = 0000000000100010
    . File has a thread record in the catalog.
    . File has hardlink chain.
    reserved1 = 0 (first link ID)
    mac1:xxx me$ cd Documents
    mac1:xxx me$ ls -a | head
    .DS_Store
    .localized
    .parallels-vm-directory
    .promptCache
    ACPI
    ActivityMonitor2010-12-1710p32.txt
    ActivityMonitor2010-12-179pxx.txt
    mac1:Documents me$ ls -lai | head
    total 17720
    135 drwxrwxrwx 91 me staff 3944 Jan 7 02:53 .
    280678 drwxr-xr-x 5 me staff 204 Jan 20 01:23 ..
    144 -rw-------@ 1 me staff 39940 Jan 15 14:27 .DS_Store
    145 -rw-r--r-- 1 me staff 0 Oct 20 2008 .localized
    146 drwxr-xr-x 2 me staff 68 Feb 17 2009 .parallels-vm-directory
    147 -rwxr-xr-x 1 me staff 8 Mar 20 2010 .promptCache
    148 drwxr-xr-x 2 me staff 136 Aug 28 2009 ACPI
    151 -rw-r--r-- 1 me staff 6893 Dec 17 10:36 A.txt
    152 -rw-r--r--@ 1 me staff 7717 Dec 17 10:54 A9.txt
    So you can see from the first few lines of the "ls -a" command, it shows some file/folders but you can't tell which yet. The next "ls -la" command shows which names are files and folders - that there are some folders (like ACPI) and some files (like A.txt and A9.txt) and all looks normal. And the "hfsdebug" info shows some details of what is really happening in the "Documents" folder, but more about that in a bit.
    And here are what a "ls -a" and "ls -al" look like for the same locations on the second Mac (mac2) where the Time Machine volume is remote mounted:
    mac2:xxx me$ pwd
    /Volumes/MyBackups/yyy/xxx
    mac2:xxx me$ ls -a
    . .DS_Store D2
    .. Documents D3
    mac2:xxx me$ ls -lai
    total 56
    280678 drwxr-xr-x 6 me staff 264 Jan 20 01:23 .
    282780 drwxr-xr-x 13 me staff 398 Jan 17 14:03 ..
    286678 -rw-r--r--@ 1 me staff 21508 Jan 19 10:43 .DS_Store
    728505 drwxrwxrwx 116 me staff 3900 Jan 7 02:53 Documents
    729750 drwx------ 217 me staff 7334 Jan 15 14:17 D2
    728506 drwx------ 25 me staff 806 Jan 14 09:19 D3
    mac2:xxx me$ cd Documents
    mac2:Documents me$ ls -a | head
    .DS_Store
    .localized
    .parallels-vm-directory
    .promptCache
    ACPI
    ActivityMonitor2010-12-1710p32.txt
    ActivityMonitor2010-12-179pxx.txt
    mac2:Documents me$ ls -lai | head
    ls: .parallels-vm-directory: No such file or directory
    ls: ACPI: No such file or directory
    ... many more "ls: ddd: No such file or directory" error messages appear - there is a one-to-one
    correspondence between the "ddd" folders and the "no such file or directory" error messages
    total 17912
    728505 drwxrwxrwx 116 me staff 3900 Jan 7 02:53 .
    280678 drwxr-xr-x 6 me staff 264 Jan 20 01:23 ..
    144 -rw-------@ 1 me staff 39940 Jan 15 14:27 .DS_Store
    145 -rw-r--r-- 1 me staff 0 Oct 20 2008 .localized
    147 -rwxr-xr-x 1 me staff 8 Mar 20 2010 .promptCache
    151 -rw-r--r-- 1 me staff 6893 Dec 17 10:36 A.txt
    152 -rw-r--r--@ 1 me staff 7717 Dec 17 10:54 A9.txt
    If you look very close a hint as to what is going on is obvious - the inode for the Documents folder is 152 on the local mounted case (the first set of code above for mac1), and it's 728505 in the remote mounted case for mac2. So it appears that these "hard links" to folders have an extra level of folder that is hidden from you and that AFP fails to take into account, and that is what the "hfsdebug" shows even better as you can clearly see the REAL location of the Documents folder is in something called "/.HFS+ Private Directory Data%000d/dir_135" that is not even visible to the shell. And if you look closely in the remote mac2 case, when I did the "cd Documents" I don't go into the inode 135, but into the inode 728505 (look close at the "." entry for the "ls -la" commands on both mac1 and mac2) which is the REAL problem, but have no idea how to get AFP to follow the extra level of indirection.
    Anyone have any ideas how to fix this so that "ls -l" commands don't generate these "no such file or folder" messages?
    I am guessing that the issue is really something to do with AFP (Apple File Protocol) mounted remote volumes. The TimeMachine example is something that I used as an example that anyone could verify the problem. The real problem for me has nothing to do with Time Machine, but has to do with some hard links to folders that I created on another file system totally separate from the Time Machine volume. They exhibit the same problem as these Time Machine created folders, so am pretty sure the problem has nothing to do with how I created hard links to folders which is not doable normally without writing a super simple little 10 line program using the link() system call - do a "man 2 link" if you are curious how it works.
    I'm well aware of the issues and the conditions when they can and can't be used and the potential hazards. I have an issue in which they are the best way to solve a problem. And after the problem was solved, is when I noticed this issue that appears to be a by-product of using them.
    Do not try these hard links to folders on your own without knowing what they're for and how to use them and not use them. They can cause real problems if not used correctly. So if you decide to try them out and you loose some files or your entire drive, don't say I didn't warn you first.
    Thanks ...
    -Bob

    The problem is Mac to Mac - the volume that I'm having the issue with is not related in any way to Time Machine or to TimeCapsule. The reference to TIme Machine is just to illustrate the problem exists outside of my own personal work with hard links to folders on HFS Extended volumes (case-sensitive in this particular case in case that matters).
    I'm not too excited about the idea of snooping AFP protocol to discover anything that might be learned there.
    The most significant clue that I've seen so far has to do with the inode numbers for the two folders shown in the Terminal window snippets in the original post. The local mounted case uses the inode=728505 of the problematic folder which is in turn linked to the hidden original inode of 135 via the super-secret /.HFS+... folder that you can't see unless using something like the "hfsdebug" program I mentioned.
    The remote mounted case uses the inode=728505 but does not make the additional jump to the inode=135 which is where lower level folders appear to be physically stored.
    Hence the behavior that is seen - the local mounted case is happy and shows what would be expected and the remote mounted case shows only files contained in the problem folder but not lower-level folders or their contents.
    From my little knowledge of how these inode entries really work, I think that they are some sort of linked list chain of values, so that you have to follow the entire chain to get at what you're looking for. If the chain is broken somewhere along the line or not followed correctly, things like this can happen. I think this is a case of things not being followed correctly, as if it were a broken chain problem then the local mounted case would have problems also.
    But the information for this link in the chain is there (from 728505 to the magic-135) but for some reason AFP doesn't make this extra jump.
    Yesterday I heard back from Apple tech support and they have confirmed this problem and say that it is a "implementation limitation" with the AFP client. I think it's a bug, but that will have to be up to Apple to decide now that it's been reported. I just finished reporting this as a bug via the Apple Bug Reporter web site -- it's bug id 8926401 if you want to keep track it.
    Thanks for the insights...
    -Bob

  • Unable to open desktop file /usr/share/applications/redhat-email.desktop for panel launcher: No such file or directory

    Dear Experts,
    Please note that I am facing a chllenge while confiuguring the VNCServer on the local test Server. The Local Test Sver OS Version is Redhat Enterprise Linux Server 
    Release 5.5 32-bit. Please review the following error message and advise me on how to fix the vncserver issue.
    [root@test .vnc]#  cat xstartup
    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc
    gnome-session &
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    twm &
    [root@test .vnc]#  cat /etc/sysconfig/vncservers
    # The VNCSERVERS variable is a list of display:user pairs.
    # Uncomment the lines below to start a VNC server on display :2
    # as my 'myusername' (adjust this to your own).  You will also
    # need to set a VNC password; run 'man vncpasswd' to see how
    # to do that.
    # DO NOT RUN THIS SERVICE if your local area network is
    # untrusted!  For a secure way of using VNC, see
    # <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
    # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
    # Use "-nohttpd" to prevent web-based VNC clients connecting.
    # Use "-localhost" to prevent remote VNC clients connecting except when
    # doing so through a secure tunnel.  See the "-via" option in the
    # `man vncviewer' manual page.
    # VNCSERVERS="2:myusername"
    # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
    VNCSERVERS="1:oracle"
    [root@test .vnc]# ls
    passwd test.oracle.co.zm:1.pid  test.oracle.co.zm:3.log  test.oracle.co.zm:5.pid  test.oracle.co.zm:6.pid
    test.oracle.co.zm:1.log test.oracle.co.zm:2.log  test.oracle.co.zm:5.log  test.oracle.co.zm:6.log  xstartup
    [root@test .vnc]# more test.oracle.co.zm:1.log
    Xvnc Free Edition 4.1.2
    Copyright (C) 2002-2005 RealVNC Ltd.
    See http://www.realvnc.com for information on VNC.
    Underlying X server release 70101000, The X.Org Foundation
    Tue Mar 11 11:18:37 2014
    vncext:      VNC extension running!
    vncext:      Listening for VNC connections on port 5901
    vncext:      Listening for HTTP connections on port 5801
    vncext:      created VNC server for screen 0
    Could not init font path element unix/:7100, removing from list!
    localuser:root being added to access control list
    No profile for user 'root' found
    SESSION_MANAGER=local/test.oracle.co.zm:/tmp/.ICE-unix/13603
    Window manager warning: Log level 32: could not find XKB extension.
    ** (eggcups:13671): WARNING **: IPP request failed with status 1030
    ** (eggcups:13671): WARNING **: IPP request failed with status 1030
    ** (nm-applet:13697): WARNING **: No connections defined
    Initializing nautilus-open-terminal extension
    Unable to open desktop file /usr/share/applications/redhat-email.desktop for panel launcher: No such file or directory
    Unable to open desktop file /usr/share/applications/openoffice.org-1.9-writer.desktop for panel launcher: No such file or directory
    Unable to open desktop file /usr/share/applications/openoffice.org-1.9-impress.desktop for panel launcher: No such file or directory
    Unable to open desktop file /usr/share/applications/openoffice.org-1.9-calc.desktop for panel launcher: No such file or directory
    [root@test .vnc]#
    Regards
    Mohammed Abdul Muqeet

    Hi,
    Try these 3 solutions
    1. Did you start vncserver services as:
    service vncserver start
    2.Check that port 5901 has not been blocked by a firewall:
    # nc -vz localhost 5901
    You should get a connection and a termination. If you get an error, fix the firewall.
    3. service iptables stop
    Hope This Helps
    Regards,
    -DK

  • Bootcache.playlist no such file or directory, slow booting 10.7.2

    Hi guys, I have this problem after updating to Lion 10.7.2 :
    There are many threads addressing a similar problem, but all the fixes mentioned there did not work (deleting bootcache and checking access rights) and also
    my problem is different, because my mac boots, after all. The others had bootloops or got stuck while booting.
    When booting in verbose mode, the message
    BootCacheControl:Unable to open /var/db/BootCache.playlist: 2 No Such file or directory
    appears, but the system still boots - veery slow, though (about 2 minutes)
    The next time it boots, it says no bootcache can be found and it builds a new one. After that it reboots by its own, without the bootcache.playlist error message, but still slow but with no problems whatsoever.
    The next boot is as the first one I described, so I my Macbook Pro Mid 2010 is looping through those problems^^
    Also, the file /var/db/BootCache.playlist is definetely existent, and has the following access rights: -rw------- (600) should not be a problem, should it?
    Ah, and maybe I should mention, that I am using the full disk encryption Filevault2.
    I hope somebody knows what to do with this vague information!
    Thanks in advance!

    i wish I had the answer; would love to find out, as it is happening to my husband's make as well.  His doesn't always boot up though.  and then he gets "disk0s2: media is not present".  Spent several hours on the phone with Apple today, and got nowhere.

  • /var/db/BootCaches.playlist 2:no such file or directory appeared after Mavericks update

    Hi all,
    I have tried to upgrade my iMac 2009 running 10.6.8, 3.06GHZ, 4GB ram machine and hit upon a grey load up screen and nothing more after the update. I have worked back through everything I could find in these forums as the bellow:
    1. Completed all of the grey screen advice from Apple bar a full wipe and rebuild, but have left this as the last resort
    2. Launched again from back up and reloaded Mavericks only to get the same problem
    3. Tried to launch in Safe mode and the computer quits half way through the status bar and will not launch into Safe mode
    4. Corrected all disk permissions in Disk Utility
    5. Checked my EFI update and am running the latest version
    6. Tried resetting the NVRAM but computer will not work from the keyboard shortcuts
    7. Run Verbose mode where I could see the problem with loading Bootcache which produces the following script /var/db/BootCaches.playlist 2:no such file or directory
    8. Created a carbon copy backup also and am now considering a full wipe
    I have updated to Mac Book Airs in the last few weeks, and after the computer auto restarts the program then moves to a new processing screen where it finalises writing script, this point never happened on my iMac and after it restarted it just hung on the grey screen with the Apple logo. It is definitely in the Bootcache problem as this is one of te last processes and matches the amount of time the computer starts working before it heads into the grey hanging screen of death. This is definitely something that mavericks script alters, moves or deletes as I have seen this problem littered across the forums as well as the in ability for Safe mode now to work.
    I am back up and running 10.6.8 at current and downloading a new version of Mavericks (more fool me). It could be a drive corruption but am unsure, but the computer s working well on 10.6.8 and has done for a very long time. Has anyone solved this yet, as t s driving me crazy!!!
    Any Jedi's out there, I would be most indebted to you!
    M-A

    Hi all,
    Well I thought I would re-post as have found a solution.
    I created a bootable USB version of Mavericks using this article here which was very informative: http://www.techrepublic.com/blog/apple-in-the-enterprise/how-to-create-a-bootabl e-usb-to-install-os-x-mavericks/
    I then rebooted via it, this again caused the grey screen of death as I thought it would, from reboot to reach this screen I held the Option Button. Before I did this I took a cloned copy of the hard drive and also backed-up again to Time Machine. Have over 470GB of music, photos and films, so yes was being a little over precautious.
    I then rebooted and went into recovery mode (Cmd and R) and erased my hard drive.
    I then rebooted once again but booted from my Mavericks USB version now with a clean hard drive, and set-up completed as expected with no problems. Its working beautifully at current but am yet to migrate files using the migration assistant, but once I have the new Mavericks version of my machine backed-up I will complete the migration, fingers crossed!
    A few days of pain, but was a good learning experience. It was more difficult than it should be to created a bootable USB, but luckily I had another mac to work on and a decent back-up drive.
    Hopefully helpful to others!
    M-A

  • Find files and establish links to help organize my computer

    I was advised to post this here instead of where I initially posted it:
    Like a lot of people, I have accumulated eBooks at different times and they are scattered all over several drives. I want to organize them. I am trying to remember how to make a UNIX script to do what I want. Then I can put it on a cron so that it will automate the process for me
    What I want to do:
    Find all .epub files
    place a link to those files in file:///Users/my_name/Documents/ePub Links/
    If this can't work then even to find and move all of the .epubs would work; however, I would prefer to use a link because I also want, with suitable alteration, to use the script to organize my pdf files. Some of those pdf files need to be left where they are because they are manuals; but, again, I would like a central list so I do not keep looking, online, for files I already have.

    Smart Folders is the way to go, however, to find files, use "find".
    To find in your Home Directory and any attached drives:
    find ~ /Volumes/ -iname '*.epub'
    To create a symbolic link:
    find ~ /Volumes/ -iname '*.epub' -exec ln -s {} "file:///Users/my_name/Documents/ePub Links/" \;
    Not sure if find will look in "file:///Users/my_name/Documents/ePub Links/" (which you don't want), but if it does, we can exclude this directory with the -prune option.

  • Can't Find Files

    Hi, I'm working on Flash 8 Proffesional and Flash Remoting,
    but suddenly my flash application can't find the libraries for the
    Remoting Service... Is there some way to know the classpath or
    librarypath that is using Flash? because I'm looking on the Program
    Files\Macromedia directory and there are the files.

    Hi @thegoldengoblet 
    What printer model do you have?  How Do I Find My Model Number or Product Number?
    While I wait to hear back from you, please download and run the HP Printer Install Wizard for Windows
    The HP Printer Install Wizard for Window was created to help Windows 7, Windows 8, and Windows 8.1 users download and install the latest and most appropriate HP software solution for their HP Printer.
    Please let me know if the Printer Install Wizard resolves the issue. Thanks.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

Maybe you are looking for