Choose folder and count files : ALIAS returned causes problem

Hello,
I have a basic choose folder command and I want to count files contained in the returned folder, I also want to do other things within that folder afterwards.
Alas, Applescript returns what it calls an ALIAS to the" choose folder" command, so that it can't count anything, it can't even give its REAL name ...
How could I get the REAL folder as a result , count its items, get its path, instead of that poorly documented ALIAS I can't make anything with ?
Thanks very much. I've been digging for a while now.

Use a construct such as:
set this_folder to choose folder
tell application "Finder"
count items of (folder this_folder)
end tell
(47355)

Similar Messages

  • My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete?

    My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete? Thanks.

    The home folder is where all of your personal files are kept.
    Best candidates to delete are movies, videos, music and photos since they generally take the most space.
    Don't forget to empry the Trash after you delete the file because the space is not returned until the Trash is emptied.
    Allan

  • I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    Gary116 please remove and reinstall Lightroom by following the steps listed in CC desktop lists applications as "Up to Date" when not installed.  The version of Photoshop Lightroom available through the Creative Cloud Desktop application supports your Creative Cloud Membership.

  • I have installed the new OS X Yosemite and now my FaceTime is causing problems. I can make and receive calls, the recipient can hear me, but I can't hear them. All I can hear is a crackling noise. The speakers work fine for everything else.

    I have installed the new OS X Yosemite on my macbook pro and now my FaceTime is causing problems. I can make and receive calls, the recipient can hear me, but I can't hear them. All I can hear is a crackling noise. The speakers work fine for everything else.

    Got the same problem – even after the upgrade to OSX 10.10.1. A restart usally helps. Even though the calls sometimes drop I got no crackling noise problem on iOS, though.

  • I have installed the new OS X Yosemite and now my FaceTime is causing problems. I can make and receive calls, the recipient can hear me, but I can't hear them. All I can hear is a crackling noise.

    I have installed the new OS X Yosemite on my macbook pro and now my FaceTime is causing problems. I can make and receive calls, the recipient can hear me, but I can't hear them. All I can hear is a crackling noise. The speakers work fine for everything else. Help, I need this functionality to speak to family.

    Got the same problem – even after the upgrade to OSX 10.10.1. A restart usally helps. Even though the calls sometimes drop I got no crackling noise problem on iOS, though.

  • I have a folder and 3 files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked?

    I have an empty folder and 3 .jpg files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked and I have full read & write access.  Grateful for any assistance in solving this problem.

    Back up all data.
    Triple-click anywhere in the line below to select it:
    ls -@Oaen De* | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

  • Index failed for Docs and PDF files with return code 8002

    Hi All,
    I try to index Word documents in a webdav folder in KM. When I add a text document the Indexing completes correctly and I can find the document via the search. When I add a Word Document or PDF to the folder and reindex I get the message Index failed with return code 8002.
    How can I solve this Problem.
    Kind Regards,
    Richard Middelburg

    Hi,
    I have changed the host already from localhost into the hostname of the linux server. I tried this also with the FQDN of the server.  I have entered the following entry
    Hostname linux = sap12
    In the URL generator service = http://sap12
    Must I restart the portal?
    Richard

  • IWeb link to folder and enclosed files

    I have several student projects that they published to a folder using iWeb, and saved to folders using other HTML editors(BBEdit, NVu). These are now on my local drive. What I want to do is to make a link from my iWeb page to their work. I need to know what directory to upload these folders to, and then what the link would be. I've tried several .Mac folders, but nothing seems to work.
    Any help would be appreciated.
    http://web.mac.com/penobscotriver/iWeb/Site/Welcome.html
    MacBook Pro   Mac OS X (10.4.9)  

    More explanations:
    If the folder were made by "publishing" from iWeb the "root" (upper level) also includes an index.html file.
    That index.html is merely a page refresh to the "real" .html file and that page loads it. If you open it with a plain text editor you'll see the simple code.
    You appear to be a teacher (instructor) so I'm sure you remember the "index card" trick for organizing.
    In the "old days" we would pin index cards onto a board and then connect them with different color strings so we had a visual of the structure. When you moved a card you also needed to detach the string and then re-attach it.
    Properly organized the "folders" would reside in your iDisk Sites folder and the "links" (the string) would attach to a page (or pages) stored in the iDisk/Web/Sites/iWeb/foldername
    You can then use some simple URL's (posted above) to aid in navigation.
    Did you know that you can "drag" a URL from a browser window address bar into iWeb?
    Takes work and patience. Trial and error. And these Discussions for help.

  • Creating Folder and Accessing Files from Folders in mobile phone

    Hello Friends,
    I am doing my project where I need to create folders and accessing files from those folders in java enabled mobile phones.But I do not know the required tasks for this.Any type of help is highly appreciated.
    Greeting
    Saadi

    You have to get the classname of the Items you receive from getitems.
    There you have only to look for Folder.CLASS_NAME. Example:
    ifsFol sorted by names in ascending order (names of folders and files)
    String[] sort_attributes = {"NAME"};
    //sort will be ascending
    boolean [] sort_orders = {true};
    oracle.ifs.common.SortSpecification sort = new oracle.ifs.common.SortSpecification(sort_attributes, sort_orders);
    ifsFol.setSortSpecification(sort);
    PublicObject[] contents = ifsFol.getItems();
    System.out.println("Here are the names of the items in folder: ");
    for (int i=0; i < contents.length; i++) {
    if (contents.getClassname().equals(Folder.CLASS_NAME)) {
    System.out.println(contents[i].getName());
    null

  • ICloud Drive shows 'Encrypted Folder' and 'Encrypted File' instead of correct folder and files names

    On my 2014 MBA (10.10.2), I added a group of folders and files to iCloud Drive in Finder by dragging and dropping.  I do not use disk encryption.  The files are of various types (mostly jpeg/pdf, and a few docx).  I can see the files when I login to iCloud.com, they are not showing as encrypted.  But on my iPad2 8.2 the folders and files show as Encrypted Files and Folders (Settings-iCloud-Storage-Manage Storage-Other Documents (under Documents and Data).  I have tried opening these with "authorized apps" on the iPad2, but the apps don't see these files.  Two questions: 1. Why are these showing as encrypted, i have no idea what is on the iPad2?; and 2. Once I can get an answer to 1., will I be able to open these jpeg and pdf files on the iPad2.  Thanks.

    Sorry we aren't communicating.  This doesn't have anything to do with a program being associated with the file.  No regular app can open an encrypted file.  Here is the final outcome.  For some reason, after 2 days, these files now show up as unencrypted files in iCloud Drive on the iPad.  That is they now match up by name and extension with what I have on the MBA in Finder.  There is no explanation except that iCloud Drive is buggy.

  • Flex and php file uploader cross browser problems

    Hi, I have a problem in flex and php file uploader. It was
    working fine in Internet Explorer, but nothing would work in
    Firefox and in other browsers. Firefox and other browsers was not
    sending the session with the file upload and was producing a login
    error. On IE the session cookie is picked up and the upload request
    uses the authenticated session, no login error. I'm newbie in flex.
    Please help me. Thanks in advance!
    Here's my code:
    bgupload.mxml

    Hello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
    The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you.

  • File name length causing problems

    I want to use my iPod suffle as a data transfer device as well as a MP3 player and am havign real problems copying folders onto it from my iBook or my desktop G4. Is it the file name lengths that are the pprblem (that's certainly the error message I get sometimes). Or the volume of data that I am trying to copy in one hit (400MB-worth)?

    It seems there is no restrictions in filename's maxlength.
    However, if you check the section 2.3 of this link
    [http://www.faqs.org/rfcs/rfc2183.html|http://www.faqs.org/rfcs/rfc2183.html]
    It says:
    It is important that the receiving MUA not blindly use the suggested
    filename.  The suggested filename SHOULD be checked
    (and possibly changed) to see that it conforms to local filesystem conventions,
    does not overwrite an existing file, and does not present a security problem
    (see Security Considerations below).I tried to test filename's maxlength with different browsers and found that results differ with browsers.
    The HTTP response header nevertheless contained the full filename.
    Above all, IMO avoiding long filename is the best solution.

  • Create folder and copy files problem

    Hello all indesign script Members
    where I work we use a permanent folder structure for an example
    a jobnumber called "123123"
    I have wrote a little interface called interface.jsx, this file is saved and located in
    123123/scripts/interface
    I want my interface to navigate two folders up
    to 123123/source/ creates  a folder called "hej" so result is "123123/source/hej"
    then I can pick from a little dialog box the folder 123123/source/a/ copy all .indd files to the folder hej (or any other folder I choose from the dialog box)
    I want the script to know the active path instead of whole locations because, we have different project numbers all the time.
    then run an extern script called hej.jsx
    the best should be also if the script could chose 123123 as default jobnumber too.
    Please could  someone help me to script this?
    /get started I am very newbie
    Thank you so much in advance
    All Adobe Members

    Hi tjacobs01,
    Thanks for reply. I didnt include main method since i dont want to make the problem looks too complicated. I called both of the methods in main. The following is the simplified class code including main method.
    import java.io.File;
    import java.io.IOException;
    public class TestClass{
    public void buildFolder(){
    File f=new File("/documents/hospital_backup");
    if(f.exists()==false){
    f.mkdirs();
    public void copyFile(String file){
    String form_cmd="cp /job_holding/hospital/" + file + " /documents/hospital_backup/"+file;
    String[] command = new String[]{"sh", "-c", form_cmd};
    try{
    Runtime r=Runtime.getRuntime();
    Process p =r.exec(command);
    BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line = null;
    while ((line = in.readLine()) != null) {
    System.out.println(line);}
    int exitVal=p.waitFor();
    System.out.println("Process exitValue:"+exitVal);
    }catch(Exception e){System.out.println(e);}
    public static void main(String[] args) {
    String dir_root="/job_holding/hospital/";
    File f=new File(dir_root);
    File[] fList = f.listFiles();
    for (int i=0; i<fList.length; i++)
    String file=dir_root+fList.getName();
    TestClass test = new TestClass();     
    test.buildFolder();
    test.CopyFile(file);

  • Create folder and move files to specific directory in AL11

    My requirement is to create a new folder in one of the existing directories in AL11 and move some files into it.
    I searched the forum and found this solution but it creates folder only in DIR_HOME directory.
    data: unixcom like rlgrap-filename.
    data: begin of tabl occurs 500,
    line(400),
    end of tabl.
    unixcom = 'mkdir mydir'. "command to create dir
    "to execute the unix command
    call 'SYSTEM' id 'COMMAND' field unixcom
    id 'TAB' field tabl[].
    I want the folder to be created in some other directory DIR_INTERFACES .
    Any suggestions are welcome ..

    Get complete path (physical path) using FM FILE_GET_NAME_USING_PATH.
    Default directory is DIR_HOME, hence it creates file in that directory...If you specify complete folder name, it will be created under that path..
    Concatenate mkdir
    space
    <physical path>
    mydir
    into unixcom.

  • Batch create folder and move files

    Hi,
    I have files such as:
    FD3_xxx1
    FD3_xx2
    Fd3_xxx3
    FD63_xxx1
    FD63_xx2
    Fd63_xxx3
    How would I create a batch file that would create folders with the characters before the "underscore" and then add the files into them. For example, all "FD3" files will go in a folder called "FD3" and all "FD63" files will go into a folder called "FD63".

    Dear Frederik and/or Bill,
    I have come across this question and your answer and it seems that this is a solution to may problem as well. However, you say that a user needs "to activate it to do something useful". I have no experience in programming and I do not know how to activate
    it. Please let me what to do to make this work.
    One needs to be careful when running batch files that move or delete large numbers of files in one fell swoop. This is why I posted the file in a passive form. To be on the safe side you must do this:
    Open a Console session with cmd.exe.
    Invoke the batch file in its current (=passive) form.
    Carefully examine the screen output it generates.
    If the output fully agrees with your expectations, activate the batch file by modifying this line
    echo move %1 %Folder%
    to read like so:
    move %1 %Folder%
    Why? Because the batch file command "echo" will write things to the screen but do nothing else. Hence the command
    echo Hell World!
    will put the phrase "Hello World!" on the console screen. Once you remove the word "echo", you will actually execute the "move" command:
    move %1 %Folder%
    A general observation: I feel somewhat uneasy about you running a batch file that includes advanced commands, apparently without you really knowing what it is doing and how it is doing it. Performing the task manually might be a safer option.

Maybe you are looking for

  • No Battery Charge and Other Problems After OS3 Install - Solution?

    This relates ONLY to iPhone Users using the "PUSH" Function for Email or Other Apps! PROBLEM: It seems as though Apple is at least aware of the problem(s), i.e. once Exchange Email or another App using PUSH is configured, there is an OS3 bug that see

  • Using swing in Full screen sxclusive mode

    Hi! I have created a game which uses swing components.... I have decieded (because it is much cool, and looks nicer) to convert the game to Full screen mode.... Mycurrent GUI consists of two JPanel s. One of which I use the paintComponent method to d

  • Buying new IMac for IMovie use

    I am purchasing a new IMac. What kind of memory do you recommend for using iMovie. If you recommend 1G, do you recommend buying one 1G, or 2 512s? What kind of routine problems have been occurring with iMovie? With my five year old Mac I routinely ha

  • Serious issues

    I think I'm probably just going to have to head to an apple store but here's what's been happening. I downloaded the latest security update yesterday, as well as the update to QT 7.5 and Safari 3.1.2 Since then I've had the following problems. And if

  • Problem of using oracle datasource in VAJ4

    I want to use connection pool in VAJ4 Websphere Test Environment. So I startup the WTE, start PNS, and at a datasource of oracle. Database driver=oracle.jdbc.driver.OracleDriver Database type=JTA; I can lookup the datasource. I can use it in normal j