Path to Folder

I want Apple Script to return the path to the folder I am currently working on.
Without having to use the "choose folder" dialogue!
TIA. Any tips would be gratefully received!
Steve

I am using the following script to make an index file for a particular folder!
              set thePath to (path to desktop as Unicode text) & "FileList.txt"
              set fRef to (open for access file thePath with write permission)
              try
                          set foldercontents to choose folder
                          set mylist to list folder foldercontents without invisibles
                          set mySum to count every item in mylist
                          set eof fRef to 0
                          repeat with filecount from 1 to mySum
                                    set newvalue to item filecount of mylist
                                    write newvalue & return to fRef starting at eof
                          end repeat
              end try
              close access fRef
Line one defines the target for the index file. (I need to create the index file in the folder where the documents are located)
And I want replace "choose folder" dialogue to the path of the folder with the documents I am indexing.

Similar Messages

  • TS5376 I did as this article described.  The download was going smoothly until I got this error message "Click OK or enter alternate path to folder in installation package containing the file itunes.msi"   Where can I get "itunes.msi"  ??

    I did as this article described.  The download was going smoothly until I got this error message "Click OK or enter alternate path to folder in installation package containing the file itunes.msi"   Where can I get "itunes.msi"  ??

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Cannot Update - Error 1324: The path New Folder or the volume is invalid. Please enter it again.

    I have been trying to update Adobe reader but every time i trie to this message shows up: Error 1324: The path New Folder or the volume is invalid. Please enter it again. I am running on Windows XP SP3 and using the latest firefox browser. I am not sure if this question has already been answered in this forum so if it has a link to the thread would be appreciated.

    For investigating more on this issue we would need the install log. For creating install log follow the below steps:
    1. Go to start menu and run command
    2. Type Regedit and press enter key
    3. Go to the following path and create keys:
    HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
    Reg_SZ: Logging
    Value: voicewarmupx
    then  Install Reader X update. Once you get the error message get the snapshot of error message and then Type %temp% and hit enter. Get the file name as  MSI----
    Provide the snapshot of error message as well as MSI log.

  • C# Getting path of folder that is created in Visual Studio and it's located in app directory.

    Alright i created folder that will contain video resources for my app.But now i need to connect it with my code.I need to get file path of folder that i created in Visual Studio,but it needs to work on other machines.I tryed Path.Combined(Environment.GetCurrentDirectory
    + @"Video\Lekcija1.mp4") but it didn't work.Any suggestions?

    If you set the Build Action of the Lekcija1.mp4 file to Content (right-click on the file in the Solution Explorer in Visual Studio) and the Copy To Output Directory property to Copy always or Copy if newer you could use the following code to get the absolute
    path to the file:
    string codeBase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
    string fullPath = System.IO.Path.GetDirectoryName(codeBase) + "\\Video\\Lekcija1.mp4";
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and please start a new thread if you have a new question.

  • Automator : issue with variable and path to folder

    I created a simple Automator Workflow with: A variable "Document Folder" and an action "Run shell script" with this command:
    "rsync -E -a -v -z --delete $@ /Volumes/MyBook/Backup/"
    I tested this command, It works very well in the terminal. But return me an error with Automator.
    "$@" is replaced by the Path when running, I guess my issue is that the content of the variable is " ~/Documents " . When it pass to the script it become "/Users/login/~/Documents".
    That can't works.
    A solution would be to put in the script the full path instead of "$@" but I would liketo understand why this error occur.
    Thanks.

    Automator actions return their results as a list of items. If you want your shell script to use the result of an action (for example Ask for Finder Items) as arguments, you need to set the Pass input: as arguments option, and place your statement in the for loop:
    for f in "$@"
    do
          /usr/bin/rsync -E -a -v -z --delete "$f" /Volumes/MyBook/Backup/
    done

  • Get path to folder on server

    Hi. I've got the following folder structure for my servlet,
    -data
      -webapps
        -testApp
           -uploads
           -WEB-INF
              -com
                 -mycompany
                    -packageName
                       -UploadHandler.class
        -secure
           -gift_imgI need to tell the server to store a file that it receives via the UploadHandler class at this location, /data/webapps/secure/gift_img/. How do I give that path to the servlet? I've tried this:
    String uploadDir = this.getServletContext().getRealPath("../secure/gift_img/");but it blows up with an InvalidArgumentException error when it tries to do the ImageIO.write() method. If I give it a path inside the app ("/uploads/"), it writes the file OK. How do I reference the folder outside of this app? Thanks.

    So... you are assuming that getServletContext().getRealPath gives you a path that ends with webApps but instead ends with testApp

  • ITunes not installing, Window XP SP3.  Warning reads "The feature you are trying to use is on a network resource that is unavailable. Enter alternate path to folder containing installation package"iTunes.msi.

    iTunes not installing.  Windows XP, SP3.  Mesage reads:" The feature you are trying to use is ona network resource that is unavailable.  Click OK to try again, or enter an alternate path to a folder containing the installation package iTunes.msi in the box below.  iTunesSetup.exe shows in my download folder, but it will not install.

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Invalid path in folder - catalog problem

    In Lightroom 4.4 I get the indication in the folder pane of invalid paths. I have accidently deleted some directories outside of Lightroom in an effort to reorganize the structure. Lightroom freezes as soon as I move in the folder pane. I have to use ctr-alt-del to exit Lightroom. Deleting the preferences file does not help because when I open the old catalog the same problem occurs.
    I tried looking for the back-up catalog file, but that does not exist. The setting was to backup every time leaving Lightroom, but when the problems started, I renewed the preferences to do the backup once a day. Something did not work out, as it is no longer there. May be it replaces a backup file? I should have checked that.
    How can I solve the folder problem???
    When I create a new catalog, I assume I will have lost all the corrections and work I did on my files.
    Operating system windows 7 - 64 bits - 16 GB RAM Lightroom 4.4 No other applications open.
    Thank you.
    Jan Minekus

    Waiting did not solve the problem, but renaming the topfolder and
    restarting Lightroom. Creating a new topfolder and moving an old
    subfolder did work!
    To be sure I did copy the old folder.
    After restarting Lightroom, I had to import the newly copied subfolder.
    Everything was allright, except the history was gone, but the metadata,
    captions and keywords are still there.
    I recreated the first problem folder and could now delete the images
    with the wrong path. After that I could remove the folder by
    rightclickting.
    Now the other problemsubfolders could also be removed.
    Problem resolved. I am stil importing subfolders. Thank you very much!

  • Set path to folder?  (Save cURL to folder) [Applescript]

    I need to save a cURled file to a certain spot.  I'm really bad at this, so I'm probably missing something obvious.  here is my script:
    set username to short user name of (system info)
    set targetpath to POSIX path of (path to "Macintosh HD:Users:" & username & ":Library:Application\\ Support:minecraft:bin:minecraft.jar ")
    set this_URL to "http://assets.minecraft.net/1_9-pre6/minecraft_server.jar"
    (do shell script "curl -L " & this_URL & " -o " & POSIX path of the destination with administrator privileges) & targetpath

    For a start, you're going about this the wrong way.
    This is the wrong way to determine your destination location:
    set username to short user name of (system info)
    set targetpath to POSIX path of (path to "Macintosh HD:Users:" & username & ":Library:Application\\ Support:minecraft:bin:minecraft.jar ")
    A much better way would be:
    set targetPath to POSIX path of ((path to library folder from user domain as text) & "minecraft:bin:minecraft.jar")
    By using 'path to library folder' you can find the localized, current user's library folder - that is, you don't ned to know the user's name, or the language of their OS, or the name of their hard drive, or any other details beyond the subdirectories.
    Secondly, your url command is a little hard to decode due to the multiple levels of commands and parameters. For example, the 'with administrator priviliges is associated with the 'do shell script' but it looks like it's part of your curl. You already coerce targetPath to a POSIX path, so there's no need to do it again. Finally, the parameters are also wrong - the URL has to be the last parameter to curl.
    I recommend a divide-and-conquer approach:
    set targetPath to POSIX path of ((path to library folder from user domain as text) & "minecraft:bin:minecraft.jar")
    set this_URL to "http://assets.minecraft.net/1_9-pre6/minecraft_server.jar"
    set curl_command to "/usr/bin/curl -o " & targetPath & " " & this_URL
    do shell script curl_command with administrator privileges
    By breaking the script into separate statements that define your variables, build the curl command, and then execute it, it's easier to read (and debug).

  • Replace path to folder

    How can I replace this line,
    set RevivalIcon to (((path to pictures folder) as text) & "Revival.png") as alias
    I want to be able to point it to a folder within the pictures folder.
    Many Thanks
    Matt

    Can you NOT just add the folder to the string your concatenating?
    set RevivalIcon to (((path to pictures folder) as text) & "SomeFolderName:Revival.png") as alias
    The ':' indicates a directory…

  • Quick Path to folder or collection

    I find myself frustrated when try to move photos to another folder or collection thats out of view because the lack of screen real estate.
    I know there is way to make a quick collection with B but is there a way to make a target folder or collection?
    If not I would love to see an alternate ( maybe floater dock) of the "Hot" folders I need to work with. This way I could move item to specific ones with out having to drag hold scroll till the proper folder or collection appears.

    Right click any collection and select the option to make it the target connection for B.
    You don't have to drag to move.  Select your images, got to the folder in question (without selecting it) and right-click and hit Move Selected Photos to this Folder.

  • Emails from camera roll saved to wrong folder -- IMAP Path Prefix Problem

    I think there's a problem with the behaviour of the way picture emails are saved when you have an IMAP Path Prefix.
    I have an IMAP Path Prefix of "INBOX"... i.e. my sent folder is Inbox/Sent. Any plaintext emails I send from the email application from the iPhone are correctly saved to that folder and I can see them in that folder immediately via the iPhone's interface.
    When I navigate to the camera roll or photo album and send a picture email to somebody, and use the iPhone to go view the sent folder, they never appear in the sent folder. For a while I thought they weren't being saved at all, but I just discovered from my home PC that the camera roll app is indeed saving them somewhere: in Inbox/Inbox/Sent.
    That's right--I now have a new Inbox folder inside my Inbox folder, with just a Drafts and Sent folder. Drafts is Empty, Sent has all the picture emails I've ever sent with the iPhone.
    Bug? I think so... Emails emanating from the camera app are taking the IMAP Path Prefix twice instead of once, and then creating that Path Prefix folder if it doesn't already exist.
    Anybody else with an IMAP Path Prefix experiencing this with picture emails from the camera roll?
    Thanks,
    Andi
      Windows XP Pro  

    Ahhh interesting to find someone else with the same problem! It definitely happens when you send a photo message. My mac mail it shows my Inbox with a new nested sent items folder. I am using fusemail and the iPhone seriously messes with the folder structure. All sent items folders vanished for some reason on the mail server (but not in mac mail oddly) and I had to call technical support to make them reappear. I think this happened when I altered the Settings, Mail, Advanced settings, Mail box behaviour folders after having this problem with sent photo messages.
    Now fusemail's webserver shows TWO Inboxes, one nested inside the other, and a "Sent Items" folder within the "new" inboxes.
    Totally strange. I think there is a bug or two in the iPhone's IMAP software. Hoping for a bug fix soon, but until then perhaps a good work around might be to set the iPhone to store sent messages locally?

  • How to write the folder path in standard webi report - Most Accessed Documents

    How to write the folder path in standard webi report - Most Accessed Documents
    All
       -> Public Folders
                      -> Auditor
                      -> ABCD
    I want to give path of folder 'ABCD' and all the reports/ subfolders under it?
    Prompt - 'Enter the Folder Path(Add % at the end to include Sub Folders)' ?
    Give me exact path syntax

    Hi Daniel,
    But when I give my URL as
    http://serverA:80/irj/portal??NavigationTarget=ROLES://portal_content/crm-practice/14-Feb/Test_Page
    I am able to access the iview but the thing is I am getting TLN,Toolarea,Masthead,etc.
    I will tell my requirement,
    ServerA (EP 7.0) has some iviews,pages...
    I need to access these iviews from serverB(EP 6.0)....
    In ServerB only the iviews has to be displayed in the content area but not TLN,Toolarea,etc.
    Kindly help me in this regard.
    Thanks and regards,
    Purushothaman.
    Message was edited by: Purushothaman Vyasarao

  • How to get the path of the folder?

    hello everybody,
    I want to retrive the path of folder. how can i do? i used File I/O > Adv file fun > File dialog and set the file dialog property to "Folder". but I cannot get the path included with folder name. Can somebody help me? thanks in advance..

    Did you select "File or Folder" for the file dialog?
    and
    Did you click on the Current Folder button when selecting the folder?
    R
    Message Edited by JoeLabView on 09-03-2008 07:56 AM
    Attachments:
    fileFolder.PNG ‏11 KB
    currentFolder.PNG ‏6 KB

  • How to get path or parent folder

    Hello
    I'm overriding method extendedPreAddRelationship on class S_Relationship.
    My purpose is to check whether the document is being put in the correct path or not.
    I can get folder name and document name using following code:
    AttributeValue av;
    av = def.getAttribute(Relationship.LEFTOBJECT_ATTRIBUTE);
    S_PublicObject folder = (S_PublicObject) av.getPublicObject(this.getSession());
    av = def.getAttribute(Relationship.RIGHTOBJECT_ATTRIBUTE);
    S_PublicObject document = (S_PublicObject) av.getPublicObject(this.getSession());
    What I need is the whole path (or at least the parent folder). Can I get path somehow? Or should I try to search parent folders?
    Jaska

    My purpose is to check whether the document is being put in the correct path or not.Hi,
    I had a similar problem - I needed to compare the path of current folder with path from parameters. Because I wasn't be able to get the path of folder, I did it in reverse way, comparing the folders. To get folder from path I needed getRootFolder method, which wasn't in server-side classes, so I extend S_TieFolder class:
    * Analogy of LibrarySession.getRootFolder().
    public static S_Folder getRootFolder(S_LibrarySession session)
    throws IfsException
    S_Folder folder = null;
    try
    Collection c = session.getValueDefaultCollection();
    S_ValueDefault vd = (S_ValueDefault)c.getItems("RootFolder");
    AttributeValue av = vd.getPropertyValue();
    folder = (S_Folder)av.getPublicObject(session);
    catch(Exception e)
    throw new IfsException(21020, e, session);
    return folder;
    In extendedPreAddItem method of S_TieFolder:
    S_Folder paramFolder = (S_Folder)getRootFolder(session).findPublicObjectByPath(folderPath);
    if( this==paramFolder ) ...
    Radek
    [email protected]

Maybe you are looking for

  • Excise and Invoice verification

    Hi During Invoice verification the system is generating error message: PART2 entry was not posted. In J1iex it shows the status of IN Process. During Posting in J1iex it issue message NO PART1 exist for availling credit. How to resolve this so that i

  • Middleware - Delta load is not working from CRM to R/3

    Hi Experts, Our client is using SAP-R/3 4.7 and CRM 5.0 Connectivity was established via Middleware and initial load of Customizing objects and Master data( Customer and Material) was finished successfully. Now if i create any Customer or Product in

  • Strange behavior of "Partial message encryption "  in OWSM

    Strange behavior of "Partial message encryption "  in OWSM If message format is like this <cban:transferFund xmlns:cban="http://cbank.com"> <cban:arg0>string</cban:arg0>    <cban:arg1>string</cban:arg1>    </cban:transferFund> Then body element confi

  • How to capture all the values(occurrence) using Extraction Rules(correlation) in VSTS web test?

    Hi,   I am using VSTS 2010 for performance testing and have a question about Extraction Rules functionality.  Requirement below. Example : Server Response <a>1</a> <a>2</a>  <a>3</a> <a>...</a> we need to capture all the values with same left and rig

  • What is the maximum number of columns that can be displayed by sqlplus?

    Hello, Questions: Is there a limit on what sqlplus can display? What is the maximum number of columns that can be displayed by sqlplus? I cannot find anything on this in my search. I checked the limits page: http://docs.oracle.com/cd/B19306_01/server