Moving Folders Version 2.  Please Help!

Hello again,
Once again I need your help with the same script but I just need a little more help.  I'm an (very) amateur scripter and I'm still trying to grasp the fundementals.  This time I need your help, so that I can also move files as well as folders.  Here is my script so far, but it doesn't seem to be working.  Pretty much I want to make it so that if I click on Files it will do the same exact thing it does for folders, but with files.
repeat
          set theChoice to the button returned of (display dialog "Welcome to Cargo.  We make it easier to move multiple folders to a specific destination.  Would you like to move files or folders?" buttons {"Files", "Folders", "Cancel"})
          repeat
                    repeat
                              if theChoice is {"Folders"} then set srclist to choose folder with prompt "Choose the folder(s) you want to move" with multiple selections allowed
                              if theChoice is {"Folders"} then set dst to choose folder with prompt "Choose the destination folder"
                              if theChoice is {"Folders"} then if {dst} is in srclist then
                                        display dialog "The destination cannot be in the source list."
                              else
                                        exit repeat
                              end if
                    end repeat
  --return {srclist, dst} -- for test
                    tell application "Finder"
  move srclist to dst
                    end tell
                    display dialog "Made by Connor Devlin.  If you find any bugs please contact me at [email protected].  If you liked this app share it with your friends.  ©McKeever Software."
          end repeat
end repeat
Problem 1: Nothing seems to happen when I click run.
Problem 2: I'm not sure how to make it so that ONLY if you click Folders will it do the process to move folders.
Problem 3: I'm not sure how to make it so that ONLY if you click Files will it do the process to move files.
Problem 4: It does not seem to recognize the variable dst or srclist.
I apprecaite all help

You seem to be stuck on using individual if..then statements instead of arranging your statements into logical groups (and the 'repeat forever' loops can get you into trouble as well).  In this case, if the choice is for files you aren't geting new source and destination choices (if you have already made the source and destination choices those will be used again, most likely resulting in a error).
The solution is to use the result of the first dialog to set whether the source items are files or folders, instead of that extra 'repeat forever' loop.
repeat -- forever (at least until canceled)
     set theChoice to the button returned of (display dialog "Welcome to Cargo.  We make it easier to move multiple folders to a specific destination.  Would you like to move files or folders?" buttons {"Files", "Folders", "Cancel"})
     if theChoice is "Folders" then
          set srclist to choose folder with prompt "Choose the folders you want to move" with multiple selections allowed
     else -- files
          set srclist to choose file with prompt "Choose the files you want to move" with multiple selections allowed
     end if
     repeat -- until valid destination
          set dst to choose folder with prompt "Choose the destination folder"
          if dst is in srclist then
               display dialog "The destination cannot be in the source list."
          else
               exit repeat
          end if
     end repeat
     log "moving:"
     log srclist
     log "to:  " & dst
     tell application "Finder"
          move srclist to dst
     end tell
     display dialog "Made by Connor Devlin.  If you find any bugs please contact me at [email protected].  If you liked this app share it with your friends.  ©McKeever Software." buttons {"Again", "OK"} cancel button "OK" default button 2
end repeat

Similar Messages

  • Since I have Yosemite on my iMac I can't view PDF files in Safari anymore.  It keeps telling me to upgrade my Adobe Reader, but it is the latest version.  Please help?  I don't have this problem on my Macbook that does not have Yosemite installed.

    Since I have Yosemite on my iMac I can't view PDF files in Safari anymore.  It keeps telling me to upgrade my Adobe Reader, but it is the latest version.  Please help?  I don't have this problem on my Macbook that does not have Yosemite installed.

    Back up all data before making any changes. Please take each of the following steps until the problem is resolved.
    Step 1
    If Adobe Reader or Acrobat is installed, and the problem is just that you can't print or save PDF's displayed in Safari, you may be able to do so by moving the cursor to the the bottom edge of the page, somewhere near the middle. A black toolbar should appear under the cursor. Click the printer or disk icon.
    Step 2
    There should be a setting in its preferences of the Adobe application such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected.
    Step 3
    If you get a message such as ""Adobe Reader blocked for this website," then from the Safari menu bar, select
              Safari ▹ Preferences... ▹ Security
    and check the box marked
              Allow Plug-ins
    Then click
              Manage Website Settings...
    and make any required changes to the security settings for the Adobe PDF plugin.
    Step 4
    Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard by pressing the key combination command-C:
    /Library/Internet Plug-ins
    In the Finder, select
              Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens by pressing command-V, then press return.
    From the folder that opens, move to the Trash any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
    Step 5
    The "Silverlight" web plugin distributed by Microsoft can interfere with PDF display in Safari, so you may need to remove it, if it's present. The same goes for a plugin called "iGetter," and perhaps others—I don't have a complete list. Don't remove Silverlight if you use the "Netflix" video-streaming service.
    Step 6
    Do as in Step 4 with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari.

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • Help!! When I open my gmail text is v. small.I have tried zoom Ctrl 0 still nothing. I would appreciate details on how to fix this. I have Windows XP Firefox 3.6.12 version. Please help me.

    Question
    Help!! When I open my gmail text is v. small.I have tried zoom Ctrl 0 still nothing. I would appreciate details on how to fix this. I have Windows XP Firefox 3.6.12 version. Please help me. It may be plugins causing trouble but I don't know how to disable them.

    To try disabling Plugins and extensions, Open Firefox in Safe Mode. If you don't know to access Safe Mode, Click Start Menu, click All Programs, Click Mozilla Firefox and select Mozilla Firefox (Safe Mode).

  • How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    The Adobe auto updater is pretty decent in CS6.  Just go to the Photoshop Help menu > Updates.
    You will be able to update ACR, Photoshop and Bridge right there, if there are in fact updates available.

  • WiFi is disabled, i am not able to on my WiFi my version is IOS 6.1.2 latest version. Please help me how to fix this.

    WiFi is disabled, i am not able to on my WiFi my version is IOS 6.1.2 latest version. Please help me how to fix this.

    see this support article:
    http://www.apple.com/support/iphone/wifi/

  • WiFi is disabled, i am not able to on my WiFi my version of IOS 6.1.2 latest version. Please help me how to fix this.

    WiFi is disabled, i am not able to on my WiFi my version of IOS 6.1.2 latest version. Please help me how to fix this.

    see this support article:
    http://www.apple.com/support/iphone/wifi/

  • Our iTunes will not open.  It reads that we need the English version? Please help.

    Our iTunes will not open.  It reads that we need the English version? Please help. 
    If I download a new iTunes will I lose everything we have?

    Same issue for me.  Was running 10.5.3 due to the bug in 10.6 with Apple TV.  Upgraded to 10.6.1 since it was supposed to solve the issues.  ANd no I can;t open iTunes at all.
    Annoyed that 10.6 was shipped with the bug with the Apple TV sortting of titles.
    Really p*ssed off that 10.6.1 which was supposed to fix this has totally borken iTunes for me.
    Time to try to revert to 10.5.3 again.
    Apple, what's happened with Q/A.
    (My setup - latest patched Lion, upgraded via Automatic update; so nothing out of the ordinary.)

  • Someone please help me!!! updated my Mac Pro and random folders deleted.. please help!

    Please help me. I have osx 10.9.2. and very important folders just disappeared. Tryed installing recovery software, I'm NOT logged in as diff user (only my computer). Please help me. Apple said I unfortunately dont have phone support? but I think with their update I should get a little help. I hate apple so bad after this.. No problems with my computer ever until this bs. Please help me.

    macisgr8 wrote:
    I disagree, hard drives are a mechanical moving device- heating and cooling, facing power surges. I've installed many versions of Mavericks but never had a problem but I am willing to spend an extra 5 minutes cleaning up the hard drive.
    How many versions of Mavericks has there been? I have installed one. The only one I have ever seen. Then updated it twice. And never used Crapware like YASU or CleanMyMac or MacKeeper etc etc and have never had an issue. And i certainly would never recommend a program that even the developers say
    "In the testing I’ve done using Yasu on Mavericks, it has performed well, so I believe it’s okay to use Yasu on Mac OS 10.9.x. Of course, I have to provide the disclaimer that I can’t guarantee 100% compatibility… If you decide to use Yasu on Mavericks, you’re doing it at your own risk."
    Pete

  • How Do I Back Up My iTunes Purchases On The 11.01 Version?  Please help!

    How do I back up my latest iTunes song purchases on the 11.01 version that I recently upgraded to?  Please help!

    See this user tip.
    tt2

  • HT201263 i am trying to restore my iphone 4s unknown error 2003 appears, i cant use my iphone already for 2 days. I have to restore my iphonebecause i haveupdated my ios tothe latest version. Please help me.

    I have updated my ios to the latest version via my desktop, at the end of the process, i am advised to restore my iphone 4s which i do so. After following the steps process, it gives me unknown error 2003 andicant use my phone anymore. I have tried to troubleshootbut to no avail. The same unknown error 2003 appears. Please help me.

    im having the same problem with iphone 4 my error is 6 ive been trying everything and nothing is working grrrrrr

  • I can't turn FaceTime on after I moved to Thailand. Please help...

    I bought the iPhone4 on April 29th, 2011 and right now I moved to Bangkok, Thailand. After I replace the micro sim with Thai sim card, FaceTime disappeared from contact page. I've been trying to search for the solution but really have no idea with it. I go to Setting>Phone>and try to turn the FaceTime on but after I leave the setting page, FaceTime turn off automatically and it shows "Your phone number will be shared with people you call with FaceTime". Anybody please help me if you guys know how to make it works. I don't know if I did something wrong.

    i use DTAC on my phone too
    and i can use facetime...
    did u connect with wifi or 3G?
    i think it's not about carrier but it's about wifi
    if u use GPRS u cant use it
    i still can use facetime when i go to singapore or hongkong
    i think u have to check ur wifi first connect with wifi and active ur number and go to setting>phone>try to turn off and turn on facetime (maybe u have to restart ur network setting 1 time)(i try it be4 n it's work):)
    if u go to Dtac shop they cant help u that much..
    i live in thailand if u need help u can ask me anytime

  • Have just upgraded iTunes to the latest version 11.1.4 and now my girls ipods will not sync with iTunes on the computer.  Worked perfectly fine before this upgrade. We don't have Wiifii. Do I need to reinstall iTunes to an earlier version? Please help

    Have just installed latest iTunes version 11.1.4 and now my girls ipod touch gen 4 won't sync with computer.  Do I need to reinstall iTunes? We do not have WiiFii. Please help - thanks

    I have windows 8, I'm not sure if that has anything to do with anything, but i figured maybe 11.1.4 just doesn't like 8. soooo.. i went onto my computer settings and uninstalled anything and everything made my apple and then reinstalled itunes 11.1.3 and it now reads my ipod nano happy day thanks apple for making something that you can't help me with at all

  • I can not load up my files on newer illustrator version. Please help me

    I recently saved my illustrator work files on an external hard drive due to me needing repair on my computer at the Apple store. I got it back with everything erased. So I had to redownload the illustrator from adobe but apparently its a different version from one i had before. Now that I have it back im trying to load my files but its telling me I have the wrong software. Please help
    Vnh Chung
    4079131721
    vchung78@gmai;

    What exactly is the warning in the dialog box?
    Did you save directly to the external drive or did you copy the files there?
    Did the files work directly after you copied them to the external drive? Did you test that with your old version?
    Do you know you can return to a previous version?
    Install a previous version of any Creative Cloud application

  • I cannot enlarge photos on Facebook, I only get a BLACK, BLANK screen when I click on them-someone suggested it might be "Screen Resolution Setting"? I've already uploaded new firefox version. Please help!

    I am not able to ENLARGE photos on Facebook, this means photos that friends post on News Feed & photos that I post in my FB photo albums. I only get a BLANK, BLACK screen when I click on individual photos. A friend suggested that I upload the New Firefox, and I did this today, but it did not resolve problem. Friend also suggested that it could be "Screen Resolution Setting"?? OR "Data Rate" too slow?? I do not know how to check these features? Please help! If it could be something else, please let me know. Thank you for your time & help!

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    You can use these steps to check if images are blocked:
    * Open the web page that has the images missing in a browser tab.
    * Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    * Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    * Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    * Select the first image link and scroll down through the list with the Down arrow key.
    * If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    See also:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load

Maybe you are looking for

  • AVReceive2 and AVTransmit2 not work the same...HELP

    I am using AVReceive2 and AVTranmit2 in a programs I am developing. I have run the two programs as the standalones they are and I get the video or audio I send across. But in my program when the program calls up the routines it launches and only does

  • Error when running Openrowset

    Hi guys, I'm trying to run this query on my machine remotely accessing our database using ssms. My laptop is 64 bit. "select * from OpenRowset('Microsoft.Jet.OLEDB.4.0','Excel 8.0; IMEX=1;Database=\\192.162.1.13\data\data.xls', 'select * from [data$]

  • Sign in User (Watch)....... using session

    hello, Suppose you have a site with many members, and when a member sign in ,, then you put user name , and Session ID, in a hash table, untill the user does not click on sign out , username and session id remains in the hash table ,,,,,, and this is

  • Need to upgrade NFS to NFS4 in solaris 8

    Hi guys, This is a solaris 8 question. Thanks for helping out. I need to upgrade the nfs in solaris 8 box to NFS4. I will glad if someone can help me resolve this issue. Thank you again. Abilash

  • Choose File Form Data Create Spreadsheet - where is this dialogue?

    This is the dialogue I need to use my pdf to generate the spreadsheet so i can add returned forms. However, nowhere can I find; Choose File>Form Data>Create Spreadsheet from Data Files This is found in the quick start tutorials in the section entitle