5 Replies Latest reply on Feb 19, 2012 9:27 PM by mac152207

    Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)

    mac152207

      Hello Sir, (Bob Levine, Peter Spler, Jongware)

       

      I am really sorry about this. I am forgotten my password so i am using new id.

       

      My question Make new folder other System it is not part of (by) indesign. Its is part of automation. I have all system (IP, Users name, password). Sir my job is create proper folder structure one by one my colleague system. So i want need your help.

       

       

      --------------------------------------------------------------------

      My old query =>

       

      Hi all,

       

      How i can new folder on other system by ip. My system ip like this 20.20.20.84 but i want make new folder this ip 20.20.20.86. You have any Java/Apple script for this.

      my both mac connf. Mac OS X 10.6.8

       

      thank you so much

      Regard ~Mac1522~

      --------------------------------------------------------------------

       

       

      Thank you so much

      Regard. mac152207

        • 1. Re: Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)
          rob day Adobe Community Professional & MVP

          Replace "My Folder" with the new folder name and replace Volume:Users:userfolder:Desktop with the path to the destination folder:

           

          tell application "Finder"

              set fName to "My Folder"

              set fDest to folder "Volume:Users:userfolder:Desktop" as alias

              if (folder fName of folder fDest exists) is false then

                  set newFolder to make new folder at fDest with properties {name:fName}

              end if

          end tell

          • 2. Re: Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)
            rob day Adobe Community Professional & MVP

            Also if the destination volume is not on the host computer you'll need to mount it before making the new folder, something like this:

             

            tell application "Finder"

                activate

                try

                    mount volume "VolumeName" on server "20.20.20.86" as user name "user" with password "pass"

                on error

                    display dialog "VolumeName is not Online"

                end try

            end tell

             

             

            Replace VolumeName, user, pass with the serving computer's specs

            • 3. Re: Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)
              mac1522

              Hi Rob day,

               

              Thank you so much for greet answering you second apply code run great (connect other system). But sir first apple code make new folder other system i am not understand actually i am new for apple script. I am attached screen shoot i need you help again.

               

              you code=>

              try

                mount volume "AP0015" on server "20.20.20.74" as user name "AP0015" with password "abc"

                        end try

               

              my question is that make new folder other system (AP0015). Sir i want this folder structure other system (AP0015)

               

              Screen shot 2012-02-18 at 11.40.08 AM.png

               

              I am really sorry for click "Correct Answers" i could not find this option

               

              regard thanks once again

              mac152207

               


              • 4. Re: Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)
                rob day Adobe Community Professional & MVP

                To make a new folder you need to provide a colon delimited string as an alias with a name property something like:

                 

                make new folder at alias "AP0015:Produce:Fruit" with properties {name:"Apples"}

                 

                which would make a folder named Apples inside a folder named Fruit inside a folder named Produce on AP0015

                 

                 

                Here's a commented script which should work:

                 

                tell application "Finder"

                 

                  --set a time out in case the server is not available

                 

                          with timeout of 20 seconds

                                    try

                  mount volume "AP0015" on server "20.20.20.74" as user name "AP0015" with password "abc"

                                    on error

                                              display dialog "AP0015 is not Online"

                                    end try

                          end timeout

                 

                 

                 

                  --the path to the folder where the new folders will be created

                  --in this case it's the root of the AP0015 server

                  --the path to the destop would be "AP0015:Users:AP0015:Desktop:"

                  --don't forget the colon at the end of the string

                          set baseFolder to "AP0015:"

                 

                  --the name of the new container folder

                          set bfName to "New Jobs"

                 

                  --a list of the sub folders to create

                          set subfolders to {"Art", "Font", "MSP", "Sample", "Version_01", "Xml"}

                 

                  --make the container folder if one doesn't already exist

                          try

                  make new folder at alias baseFolder with properties {name:bfName}

                          on error

                                    display dialog "A Folder at " & baseFolder & " named " & bfName & " Already Exists"

                          end try

                 

                  --loop through the sub folder list and make the subfolders

                          repeat with i from 1 to number of items in subfolders

                                    set subname to item i of subfolders

                  make new folder at alias (baseFolder & bfName) with properties {name:subname}

                          end repeat

                 

                end tell

                • 5. Re: Make.New.Folder [JS] (mac1522 is old) my new id (mac152207)
                  mac152207 Level 1

                  Hi rob day sir,

                   

                  Thank you so much your apple script code simple great thank you sooooo much once again.

                   

                  ~Regard~

                  mac