Choosing which folder to save downloaded files to as soon as file is downloaded?

I'm completely new to this so if there's a simple solution to this, do forgive me and thanks in advance for your patience!
So I've just started messing about with Automator today and read about Applescript.
I'm basically trying to find a way of having a prompt for me to select which folder I'd like to save downloaded files to, as soon as the files are downloaded into that folder.
I've tried a couple of things:
Setting up a Folder Action in Automator for my Downloads folder.
'Revealing items in Finder'
'Get selected items in Finder' (thinking that this somehow grabs the items that were revealed and selected in the previous step)
Then running an Applescript (as an 'action' in Automator) to do something like this:    
on adding folder items to this_folder after receiving these_items
  tell application "Finder"
  set the destination_folder to [choose folder with prompt choose folder]
  end tell
end adding folder items to
Or something like this:
on run {input, parameters}
  tell application "Finder"
  select files
  move files to [choose folder with prompt choose folder]
  end tell
  return input
end run
As you can probably tell, I really haven't a clue (although this is addictive and I can't deny I'm enjoying myself)... I've tried a few more variations based on scripts I've seen dotted around the web doing similar things but I didn't hold on to them so I can't show you them. The script  actually runs really smoothly, and runs through with no errors - I copy a file into my downloads folder (to test) from another folder. The Downloads folder opens up automatically, selects and shows me the file I've just added then pops up with the window prompting me to choose a folder. It's just that when I do end up choosing the folder, the file doesn't move at all. The window disappears then pops back up again, then disappears after I press 'Choose' for the second time, as though something has happened. I suppose the files that the Finder revealed, selected and 'got' had no connection to the following action/script?
What do I need to change? As I said, completely new to all of this so please do treat me like I'm a bit stupid!
Thanks!

Others have already given alternative pointers to solve your specific problem, but I can understand the desire to roll your own
From your script samples, you're on the right track, but are missing a couple of key concepts. I'll try to clarify.
Your script:
on adding folder items to this_folder after receiving these_items
  tell application "Finder"
  set the destination_folder to [choose folder with prompt choose folder]
  end tell
end adding folder items to
First up, let's correct that 'choose folder' command. Specifically, the prompt - it should be a string (enclosed in quotes). As it stands, conceptually, you're kind of invoking 'choose folder' again, and the result of that is used as the prompt on the first 'choose folder'. Not going to work so well.
Instead, your choose folder should look more like:
  set the destination_folder to choose folder with prompt "Select a folder:"
Note how I've quoted the text and now it's interpreted correctly - the selected folder will now be stored in destination_folder.
Now that you have the destination folder, what you need is the files to move. Fortunately, Folder Actions provide this for you in the way the command is called:
on adding folder items to this_folder after receiving these_items
In this case, these_items is a list of the newly added files., so all you need to do is move these files to the destination_folder:
on adding folder items to this_folder after receiving these_items
  set the destination_folder to choose folder with prompt "Select a folder:"
  tell application "Finder"
  move these_items to folder destination_folder
  end tell
end adding folder items to
Note how I've moved the 'choose folder' line outside of the 'tell application "Finder"' block - there's no need for it to be in there, and this way it will prevent the context switch where the Finder comes active to ask you for the folder.
Incidentally, this is a 'pure' AppleScript implementation, not an Automator action. The Automator action would be radically different in that the files would be passed into your workflow - you'd need to store these in a variable, then prompt for the destination folder and store that in another variable, then use the move Finder items action to move the files, like:
Personally, I prefer the AppleScript option

Similar Messages

  • Can Mail be configured to ask me which folder to save a sent email in?

    I'm running Mail 5.2 under Lion 10.7. Rather than save all my sent e-mails in a single Sent folder, I'd like to have Mail ask me which folder to save an e-mail in, after I hit the Send button. Is this possible?

    Ernie,
    You beat me to the punch... I was just about to reply with a follow-up asking if there was a way to do just that. Looks like I may need to use the separate accounts option in order to allow my to have Full Name information that is more helpful. For now, it won't be a problem because I only need 2 different addresses. If that changes in the future, however, I can see how it would be a problem.
    It would be simple if I could add a comma-separated list of Full Names in the Full Name field (in the same order as the list of addresses) and have them match up.
    Hmmm... might have to try that, just to see if it would work!
    Thanks again.

  • When I am prompted to choose a folder to save downloaded files to, why does 7.0 start the download browser in a random folder rather than the last folder saved to?

    When prompted to choose a destination folder for files that I am saving, I have found that 7.0 doesn't always open the file browser with the last folder I saved to. In previous versions, if I saved a jpg to a specific folder, it would open still directing me to that same folder the next time I was prompted. Now, if I am saving a string of images, there is no telling which folder the browser will be opened to when I am prompted. Very annoying to 1) have to figure out where I am in my filing system and 2) have to work my way through god knows how many folders to get back to where I saved the previous file ten seconds earlier. If this is some kind of smart feature that's making suggestions based on file source history or downloading patterns or whatever, can I turn it off? Here's hoping that you can help, because I really want this to be an easy fix rather than a bad version of your otherwise flawless program or worse yet a deteriorating hard drive.

    Firefox 11+ versions have support via <b>browser.download.lastDir.savePerSite</b> pref to disable to disable the feature to remember the download directory based upon the URL.<br />
    The browser.download.lastDir.savePerSite pref doesn't exist by default (it is hidden).<br />
    Create a new <b>Boolean</b> pref with the name <b>browser.download.lastDir.savePerSite</b> and set the value to false.
    You may have the clear the "Site Preferences" via Clear Recent History to remove already stored data.
    *Tools > Options > Privacy : History: [X] Clear history when Firefox closes > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    See also:
    *[[/questions/887248?page=2#answer-318910]]
    * https://developer.mozilla.org/en/Preferences/browser.download.lastDir.savePerSite

  • Can you choose which folder an app gets installed to?

    When I install a new app it just goes to the main page then I have move it to a certain folder. Is there a way to have it ask where you want to install it instead of having to organize it after the fact?

    The iOS doesn't support where to designate which screen you want an app installed to BUT, connect your iPad to your computer, launch iTunes. Select Apps in the menu.
    You can drag and drop apps from one screen to the other or move screens around then click the Sync button bottom right side of the iTunes window.
    You can provide feedback to Apple. Never know, they might come up with a way to do that.
    http://www.apple.com/feedback/ipad.html

  • Best practice for infoview and which folder to save webi or crystal reports

    All,
    I was wondering what are your thought about the following question.Imagine you have a customer using at the same time webi reports and also crystal reports against BW.
    The thing is that he is transporting the crystal report thru SAP using the rsadmin transaction to manage his crystal reports, but also use the SAP transport to move them to PROD .As far as webi, he is using the import wizard to move them to PROD. \
    As you know the crystal reports will end up into an SAP folder .. something that is such as SAP/(description of the menu role).
    Well webi reports happen to be inside the public folder.
    The question was .. what would be the best practice
    1 u2013 store all your crystal reports against BW in the SAP menu roles as it is ending up thru the SAP transport and have the webi reports inside the public folder ?
    2 u2013 Copy your webi reports from the public folder to the SAP /Menu role folder where my crystal reports are ?
    3 u2013 copy your crystal reports from the SAP/(menu role folder) to the Public folder ?
    Let me know what is your feeling as best practice
    Thank you
    Philippe

    Just a hint:
    The path SAP/2.0 is not mandatory. You can configure the SAP BW publisher on the BW side (transaction /CRYSTAL/RPTADMIN) so that your reports will be stored in another folder on the BOE side. Please note that the addition of the role name in the path cannot be overrided.
    Regards,
    Stratos

  • Why does the folder repeate twice when I change the download folder or save files to location?

    If I choose another folder to save my downloaded files to, it repeats that folder twice. For example, I will choose my desktop and it will place the location as C:\Users\PC\Desktop\Desktop instead of just C:\Users\PC\Desktop. I tried disabling all add-ons and running it in safe mode, resetting all preferences, deleting the .perf file, reinstalling Firefox without saving preferences, yet I am still having the same problem.

    See:
    *http://kb.mozillazine.org/Preferences_not_saved
    *https://support.mozilla.org/kb/Preferences+are+not+saved

  • I deleted my download folder and now I can't download anything. I can't select the folder to "save file to" and when I select "ask me where to save files" I still can't download. it says your file will start downloading, but then it doesn't. Help!!

    I deleted the folder that saves everything that is downloaded from Firefox. After that I can't download anymore. I've tried clearing my download history, reset the download folder, reset the download action by renaming the mimetype.rdfs file and it's still not working. I've tried to choose a different download folder but it doesn't let me select any folder at all. If I select "ask me where to save files" and then try and download something, the download doesn't start after I select save to. The only time it does actually download is when I select "open with...windows mediaplayer" when downloading then the download will start. Please help. Thank you.

    You broke your phone by getting it wet.  Nothing more to say.  Bring it in to Apple for an out of warranty exchange or buy a new phone.  There's really nothing else we users here can help you with.

  • I cannot get firefox to download -- a box comes up about firefox being a binary file (?) and do I want to save it or cancel -- I was told to save it, which I did but, after saving, I tried to get it to download again and this same box came back up

    Cannot get firefox 4.0 to download - saved binary code download - download still doesn't work - cannot use computer until this is resolved

    For Flash, could you try downloading the "full" installers from this page:
    https://www.adobe.com/products/flashplayer/distribution3.html
    In the first table, there are two rows for Windows: one for the ActiveX control for IE, and one for the plugin for Firefox. You might want to grab both. And try the .msi files instead of the .exe files to see whether those work better.
    Will either of those install?
    It's odd that on a newly rebuilt system your More System Details shows that you have a user.js file, which is an optional settings files used to override your previous session settings. This is not part of the standard Firefox installation, so if you did not create that file yourself, you may want to investigate or delete it. This article has more information on that: [[How to fix preferences that won't save]].

  • A .part file was created when I cancelled a download from a "Save As" dialog.

    On my Macbook Pro (my OS is OS X 10.6.8), sometimes when I click on a download link, and then click Cancel (meaning I did NOT start the download at all), a .part file appears in my Downloads folder.
    However, not all download links cause this problem to happen. Download links for things like MP3s and JPGs rarely cause this to happen, but download links for xls or torrent files will most likely cause this problem.
    I've tested it. When I click on a download link for an MP3 file, but didn't click OK or CANCEL, a .part file would appear in my Downloads folder. However, when I hit CANCEL, the .part file goes away.
    But when I tried this on a download link for a XLS file, the .part file stays there even after I hit CANCEL. To delete it, I had to drag it to the Trash folder myself and then empty the trash.
    So is this a bug? Am I infected with a virus? Does your Mozilla Firefox create a .part file when you click on a download link but not confirm whether you want to download the file? Does the .part file go away after you hit CANCEL?
    Thanks in advance.

    hello, it's normal that downloads will start loading in the background and that a .part file is created even when you haven't made any choice on the "save as" dialog yet (in order to shorten the download time, it takes afterwards). however, those .part files should get deleted if you cancel the download.
    if this isn't happening with all file-types you could try going through some troubleshooting steps related to downloading, which are described here: [[What to do if you can't download or save files]]

  • I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Every time I save a project it creates a new file in my movie folder

    Instead of updating the previous file a new one is created so I have numerous files of the same project and can't figure out which one to open. Things are getting more and more confusing the more I use my G4 since installing iLIFE '06. Can anyone help me try to get a handle on this?

    Chris, my guess is you may be confused by one or more tilde files inside the project, a project file with a tilde (~) in its name.
    If the project was begun in iMovie 4, the project resides in an iMovie 4 type-folder, not an iMovie 6 package. The folder lets you see the tilde file. For projects begun in iMovie 5 or 6, the project is a package instead of a folder. And you never see the tilde file, for the package looks like a file instead of a folder.
    The problem is discussed here:
    http://discussions.apple.com/thread.jspa?messageID=1971832&#1971832
    My guess is you're opening the wrong project file to re-open the project. So when you save, it's saving a new tilde file.
    The whole issue is rather confusing. Check out the topic, and if you can't get it straightened out say more about what's going on there.
    Karl
    PS: If you haven't yet, create a new iMovie 6 project, add something to it and save. To look inside the package, Control-click on the project (in the Finder) and choose "Show Package Contents" from the popUp menu. You will see one tilde project file and one project file without a tilde. That's ALL the project files you should ever see.

  • Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera'

    Is it wise to keep the Nikon camera files "DSC's"  after downloading them and converting to DNG files via Adobe converter for lightroom use. In other words do the DNG files have all the raw data I would ever need in processing or should I save the camera's DSC files?

    DNG files do not contain some metadata supplied by the camera, which can be used by the manufacturer's software. Thus, if you don't keep the original Raw photo, you will lose this information.
    If your 1000% sure you're never going to use the manufacturer's software, then this isn't a problem. But who can be sure what software you will be using 10 years from now?

  • In linux, saving a background image (set as Desktop)feature doesnt download my image to wallpaper folder..or even to standard "Save download" feature. Can I tell firefox where (what folder) to save my "Set as Desktop" picture?

    When I find a suitable picture to use as wallpaper" I often right click and use the menu item "Set as Desktop Background". The file ""example.jpg" is saved in directory\folder "/home/user" rather than for example "/home/user/my wallpaper" or in the directory
    "/home/user/Downloads". The latter as being set under the "Downloads" section on the "General" tab in the "Preferences" dialog box.
    Is there a configuration file where I can change the default location to save my "Set as Desktop Background" images. Or better still can the menu be customized to launch the application that allows me to set my desktop wallpapers?
    I am using the "PCLinuxOS" Linux OS but I have encountered this issue in many if not all the Linux distributions I have sampled.

    Don't use "Set as Desktop". Use ''' "Save Image As..." ''' instead, and file it with your other "wallpaper" images so the operating system has access to those images.
    IIRC, Firefox saves a "desktop image" to the Profile folder, and it will only save one image, at that. Change the image and the previous one is gone.

  • When I try to save a webpage as a bookmark, the options window where I choose the folder where I will save it is disappearing when I try selecting it

    Step 1. I open a web page.
    Step2. I press ctrl+d.
    Step3. I do not see the window where I choose the folder I wish the bookmark to be saved in.
    Step4. I clicked the star button on the right corner of location bar.
    Step5. I see the window now.
    Step 6. When I move the cursor down that window to choose the folder it again disappears.
    Step 7. I randomly click at a spot in the area where the window disappeared.
    Step 8. I realize that it does not go away but stays hidden disappearing.[http://www.youtube.com/watch?v=WV050BObT9I]

    hello bdavis106, please refer to [[Find and manage downloaded files]].

  • If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and gi

    If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and give the extension name is plz tell me the way that office files are compatible with it.
    == This happened ==
    Every time Firefox opened
    == when i download the office files

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

Maybe you are looking for