Folder Structure Script Only Works Locally? Any thoughts?

Hello,
I am using this script to copy the folder structure so I don't have to manually create new folders and copy/paste the names. This script works great locally. But when I need to use it on our servers. It does not work. Any thoughts?
on run
          set source_folder to choose folder with prompt "Select folder to be duplicated:" as string
          my do_main_script(source_folder)
end run
on open of source_folder_list
          repeat with i from 1 to number of items in the source_folder_list
                    set this_folder_path to item i of the source_folder_list as string
                    if last character of this_folder_path is ":" then
                              my do_main_script(this_folder_path)
                    end if
          end repeat
end open
on do_main_script(source_folder)
          tell application "Finder" to set source_folder to folder (source_folder)
          set the target_folder to (choose folder with prompt "Where would you like the duplicated folders to be moved to?")
          if source_folder is not "" and target_folder is not "" then
                    set new_folder_name to (name of source_folder as string) & " duplicate"
                    set source_folder to source_folder as string
                    set target_folder to target_folder as string
                    my create_new_folder(target_folder, new_folder_name)
                    my duplicate_folder_structure(source_folder, target_folder & new_folder_name & ":")
          end if
end do_main_script
on duplicate_folder_structure(source_folder, target_folder)
          tell application "Finder"
                    try
                              get name of folders of folder (source_folder)
                              set folder_list to result
                              repeat with i from 1 to number of items in the folder_list
                                        set this_folder_name to item i of the folder_list as string
                                        my create_new_folder(target_folder, this_folder_name)
                              end repeat
                    end try
          end tell
end duplicate_folder_structure
on create_new_folder(target_folder, new_folder_name)
          tell application "Finder"
                    try
                              if not (exists item (target_folder & new_folder_name)) then
  make new folder at folder target_folder with properties {name:new_folder_name}
                              end if
                    end try
          end tell
end create_new_folder
Best,
Anthony

Hi Frank,
It copies the root folder but it stops there. The folder structure is very very deep and these jobs are very large. I'm thinking there too large for this script to handle. If I work off an external hard drive or locally it works without a hitch.

Similar Messages

  • On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed?

    On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed? It used to fully lay out the photos so I could add notes and detailed information before I sent them. I am thinking it is something simple that I have just missed...

    The "Photos" view has been replaced by the Media Browser.
    Most applications will show you the Photos icon in the Sidebar, when you need to select photos in a file chooser dialoge. Mail, Safari, the iWork apps. See Terence Devlin's User Tip: How to Access Files in iPhoto
    For example, in the File > Open dialogue in Preview I am seeing this in the sidebar.

  • My iPod 5 will not sync ANY music. All my music was on prior to syncing. The sync deleted all my music. I can now no longer add any music. I have the "sync music" checked. Restoring factory settings did not work. Any thoughts?

    All my music was on prior to syncing. The sync deleted all my music. I can now no longer add any music. I have the "sync music" checked. Restoring factory settings did not work. Any thoughts?

    When you synced with iTunes It would have tried to replace the music on the iPhone with what is on the computer. which is what happens when you sync with iTunes.
    If the songs are purchased you can re-downloaded them Pretty easily. You mentioned that you still see the songs and that you could not play them. Do they have a Cloud symbol next to them? If so this means that you can download them but that they are not on the device.

  • I purchased PSE 13 but have a Vista OS. It was suggested in this chat room that I download PSE 12. I did that & installed. The serial # for 13 does not work. Any thoughts on how I can get a number for PSE 12?

    I purchased PSE 13 but have a Vista OS. It was suggested in this chat room that I download PSE 12. I did that & installed 12.
    The serial # for 13 does not work. Any thoughts on how I can get a serial number for PSE 12?

    Hi
    There is a newer version of Resolution+ Plug-in released for an Qosmio X series
    [Resolution+ Plug-in v 1.1.2004|http://eu.computers.toshiba-europe.com/innovation/download_driver_details.jsp?service=EU&selCategory =2&selFamily=381&selSeries=231&selProduct=7506&sel ShortMod=null&language=13&selOS=all&selType=400&ye arupload=&monthupload=&dayupload=&useDate=null&mod e=allMachines&search=&action=search&macId=&country =all&selectedLanguage=13&type=400&page=1&ID=82406& OSID=30&driverLanguage=42]
    try it out...
    If it has not been installed properly, try rebooting your computer and reverify.

  • I tried shutting down the app and relaunch iMessage. Still not working. Any thought?

    I tried shutting down the i message app. And relaunching it. It didn't work.  Any thoughts?

    http://support.apple.com/kb/TS2755

  • The front and back camera on my itouch second generation stopped working. Any thoughts on how to fix it?

    The front and back camera on my itouch second generation stopped working. Any thoughts on how to fix it?

    First, try to reset the device by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose data by resetting.
    If this does not work, set it up as new device again, explained in this article:
    How to back up your data and set up as a new device
    If still no luck, get it serviced, the issue might not be software related.
    Apple - Support - Service Answer Center

  • Insert - Image Objects - Rollover Image only works locally

    Checked paths all look fine, files work locally but not remotely. Tried both site root and document paths.
    Any help?
    rd

    How are you uploading these pages?  They are being stripped of carriage returns when they hit the server, which 'corrupts' the javascripts in a way that makes it non functional.  Here is your code as it sits on the page you have linked -
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Untitled Document</title><script type="text/javascript">function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}</script></head><body onLoad="MM_preloadImages('AboutPressMagRollovers/creditMag1color.jpg')"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ro1','','AboutPressMagRollovers/creditMag1color.jpg',1)"><img src="AboutPressMagRollovers/creditMag1bw.jpg" name="ro1" width="90" height="114" border="0"></a></body></html>
    Note that it is all one long line.
    Here is your code that I have fixed just by adding the carriage returns -
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr;
    for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document;
    if(d.images){
    if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0; i<a.length; i++)  
    if (a[i].indexOf("#")!=0){
    d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
    function MM_findObj(n, d) { //v4.01
    var p,i,x;
    if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
    if(!(x=d[n])&&d.all) x=d.all[n];
    for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
        if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments;
    document.MM_sr=new Array;
      for(i=0;i<(a.length-2);i+=3)
         if ((x=MM_findObj(a[i]))!=null){
    document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
    </script>
    </head>
    <body onLoad="MM_preloadImages('http://www.hairinvogue.com/AboutPressMagRollovers/creditMag1color.jpg')">
    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ro1','','http://www.hairinvogue.com/AboutPressMagRollovers/creditMag1color.jpg',1)"><img src="http://www.hairinvogue.com/AboutPressMagRollovers/creditMag1bw.jpg" name="ro1" width="90" height="114" border="0"></a>
    </body>
    </html>
    You can see it work here - http://gws-sandbox.com/invogue.html

  • Airport Utility 5.6 fails installation every time on MacBook Pro running Lion. Apple says should work. Any thoughts out there? Thanks, Allen

    I am trying to set up an older Airport as a "range extender" with MacBook Pro. Message is I need to use Airport Utility 5.6. I downloaded it, but installation fails every time. I'm on Lion. Any suggestions out there? Thanks, Allen

    AirPort Utility 5.6 for Lion will only work for systems running OS X 10.7.2.
    To install it on later versions requires the workaround described in this thread: How do I configure an Airport Express when I get this message in Airport Utility? "This version of AirPort Utility doesn’t support this base station."
    Pay attention to the caveat in the final paragraph, restated here for emphasis:
    Keep in mind that Apple's decision to abandon support for your original AirPort Express was for reasons known only to them. Remember that you are using obsolete equipment, should some future OS X feature not work for you.
    I am trying to set up an older Airport as a "range extender" with MacBook Pro.
    The only way to "wirelessly extend" a wireless network using the original 802.11b/g - only AirPort Express or Extreme is to implement a WDS, a woefully inefficient compromise that's difficult to configure even for experienced users. You can use an original Express or original AEBS as an additional wireless access point for a wired LAN in a "roaming network" though.

  • After activating my iPhone 4s, my phone number shows up as "n/a" and my old iPhone is still working. Any thoughts?

    After syncing my new iPhone 4s, my old iPhone is still working and the new one says No Service. When I connect to iTunes, it says my Phone Number is "n/a" and my old iPhone is still working.
    When activating initially through AT&T, I had no problems, but I've just never gotten service. Any thoughts? Could this all just be due to the servers being overloaded today?

    After waiting on hold for a long time, I talked with AT&T to determine that the ICCID and IMEI numbers didn't get changed in their system.  (I'm guessing lost in transfer due to the load on the system?).  They took down the info, disconnected the call (I had to call from the 3Gs - no landline), and then called me back on my 4s.  Problem solved.
    Hold times suck right now, but at least 611 calls don't cost you minutes and speaker phone is your friend

  • I just downloaded the newest version of iTunes (for windows) and all of my saved Genius playlists disappeared and now Genius doesn't work.  Any thoughts?

    I just downloaded the newest version of iTunes (for windows) and all of my saved Genius playlists disappeared.  In addition I can't start Genius at all right now.  I tried updating it but it still won't start.  Any thoughts?

    With iTunes 11 on PCs the drop-down menus are hidden by default - control-B should get the menus to show
    This screenshot is from a Mac, but it should be similar on a PC :

  • PB display works, but only sometimes. Any thoughts?

    The computer is an older PB G4 Titanium 500Mhz. Currently running OS X 10.4, though I am in the process of a second erase and installing 9.1 that came with it.
    Out of nowhere last week the screen just froze, on restart it was completely black. But after turning it on and off a few times the screen will appear, but it will freeze within a half hour or so of use. I have erased the drive and reinstalled a new system, ran the Hardware Test, replaced the battery(as it wasn't holding a charge), and the power cord which was showing signs of wear.
    I don't believe it is the inverter as the screen is not even faint, it's completely "off", no sleep light etc. The only thing that I am able to do on a consistent basis is start up from the installer CD. This is what leads me to believe it's not the display itself. But at this point I am beyond baffled.
    Anyone encounter a similar issue or have any idea what could be going on?

    Apologies, wrong board.

  • Flash Player Only Works Locally

    Im using this tutorial to create a flash player that works
    for Flash Player 6 & 7.
    http://www.communitymx.com/content/article.cfm?cid=12EBE
    It works great when I test it locally but not after its been
    uploaded. I've tried local and absolute url's, again both work only
    locally. Funny thing is I had bought a third party component for
    this and it did the same thing. I thought there was something wrong
    with the component.
    Any help would be greatly appreciated.
    Amelia

    erm...
    U are actually having a problem with Security Sandbox
    Violation.
    Where ur flash are trying to access a file from the server.
    So, to solve this,actually there's many way..
    let me sent u the link, try read this, it helps:
    http://www.adobe.com/devnet/flash/articles/fplayer8_security_03.html

  • Help Embeded flash only works locally.

    Please could someone help me. I am new to flash and have created my first flash video, a simple set of fading photos for my website front page.
    I am using Flash, Dreamweaver and Fireworks all CS3,
    The webpage can be found at http://www.wildennerdale.co.uk/index2.html
    The flash video can be found at http://www.wildennerdale.co.uk/flash/homepage%20image%20show.swf
    The flash video is embeded in the webpage and works fine in preview mode in Dreamweaver but does not appear at all in the uploaded webpage.
    The flash video works fine through the link on the webpage.
    I have uploaded the AC_RunActiveContent.js script to a scripts folder and to the folder where the webpage is and also the folder containing the flash video file.
    Please could anyone suggest what I am doing wrong or need t do extra.
    Many thanks
    Gareth

    A couple of things...
    1) case matters - "scripts" and "Scripts" will be different, so change either the folder name or the page code to agree with each other.  And you don't want to have the "../" leading it based on where I found the file.
    2) Don't use spaces in the names of any files you use in the web.

  • Flash media server only works local on server

    i just installed a developers version of the flash media
    server on a windows server.
    i don't have any problems while starting my applications on
    the server itself.
    the problem only appears when i try to connect from a
    different computer which is not located in this network,
    at least a connection from "outside".
    there is no firewall right now on that server that this can't
    be the problem.
    when starting the media server by the managment console i
    also do login with the domain-name of the server and not with
    localhost...locally all is working well...but not from outside.
    i also try to test port 1935, 443 and 80, but none succeed
    from outside.
    what i also tried is to run a version of the flash
    communication server 1.5 on my home pc also running a windows
    server. in this case i had the same problems: could only get a
    connection locally but not from outside...i.e. the connection to
    the server failed.
    anyone an idea?

    FMS3 is officially support on Windows 2003 server &
    RHEL-4 only.

  • Script only works in Safari

    I am trying to add a login form from an external website to my iWeb site. The HTML Snippet works great to add the script, and it shows up in iWeb fine. Then I publish it and it shows up in Safari fine, but it wont show up in any other browser. Not IE, not Chrome, not Firefox.
    The published page is located here: http://www.courtneymarinvoice.com/CMV/MTH.html
    The script I am trying to include is this:
    <script type="text/javascript">
    var studioTitle = "My Music Studio";
    </script>
    <script type="text/javascript" src="http://www.musicteachershelper.com/js/remotelogin.js" />
    Anyone have any guesses???

    your code is missed form, this line:
    <script type="text/javascript" src="http://www.musicteachershelper.com/js/remotelogin.js" />
    should be:
    <script type="text/javascript" src="http://www.musicteachershelper.com/js/remotelogin.js" ></script>

Maybe you are looking for

  • Cannot connect to Airport Extreme. Did I buy wrong product?

    Hello I am having a problem connecting my Airport Extreme Base Station. I have an iMac flat screen PowerMac G4 running Tiger 10.4.11. I purchased the Airport Extreme Base Station in hopes to connect this and other Mac computers in my house to a wirel

  • Reservation Vs.Allocation

    Hello, we are working with Oracle Apps in a WMS inventory org on R11.5.10.2. We have an issue that seems to be a GAP within the Oracle Logisitics footprint and I was wondering if any of you can help with a solution We have sales orders coming from 3

  • Oracle 9i patch for new DST changes

    For oracle 9i is there any patch available to take care DST 2007 changes? How oracle get the current date? Is oracle depending on Operating System?

  • Problem in Sybase Metadata accessor information

    Hi! I am accessing Sybase database thru JConnect 5.5. If I try to access Metadata information, it throws the following exception. As per JConnect documentation, to access metadata info, one has to run a stored procedure i.e., sql_server.sql(for versi

  • Problems converting videos

    i recently tried to convert a movie that was .avi format to mpeg 4 using mpeg streamclip 1.0. There is no video and the audio is messed up. Is the problem that the movie was .avi to begin with? Or is soemthing else wrong? Thanks.