MACSCRPT Archives

August 2011

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Pugh <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 23 Aug 2011 19:02:36 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
Without your server mounted, open a Finder window.  Type Cmd-Shift-G (Go to Folder... off the Go menu) and type "/Volumes" into the box and hit OK. 

I suspect that in this folder you will have bad aliases &/or folders with your server's name.  You can safely throw them away.  What may be happening is that the server is mounting and the disk name is conflicting with these erroneous items and getting renamed.

If not, then something else is going on.  ;)

Jon

On Aug 23, 2011, at 2:09 PM, SUBSCRIBE MACSCRPT Inyo55 wrote:

> Whoever can solve this will have my regard as being a Genius:
> 
> Here is the first part of my script.  It is a script to rename files.  The files are dropped onto the script to start it:
> 
> ----------------------------------------------------
> 
> 	tell application "Finder"
> 			
> 			try
> 				set jFolder to folder of item 1 of filelist --path of folder files were dropped from
> 				set jpath to folder of item 1 of filelist as text --make it a string to use.
> 				set AppleScript's text item delimiters to ":"
> 				set PMName to (text item 1 of jpath) & ":" & (text item 2 of jpath) & ":" & (text item 3 of jpath) & ":" as string 
> 				set afolder to (text item 1 of jpath) & ":" & (text item 2 of jpath) & ":" & (text item 3 of jpath) & 
> ":HotFolders:DestFolder
> 				set jobname to text item 3 of jpath
> 				set AppleScript's text item delimiters to {}
> 				if jpath does not end with "To Be Renamed:" then
> 					beep
> 					display dialog "Files must be in the 'To Be Renamed' folder of " & jobname & "." with icon stop buttons 
> {"Cancel"} default button 1
> 				end if
> 				
> 			on error errmsg
> 				display dialog errmsg
> 			end try
> 		end tell
> 
> -----------------------------------
> 
> In the above script, text item 1 of jpath should be "CF10_O".  Yet, if I ask the script to return jpath as a string, the volume name becomes 
> "CF10_O-4" which is not right.  I have no idea where the "-4" is coming from, it is not in the Mac Share name on the server.  Since the 
> volume name is not as it should be, the script cannot set afolder and errors out.
> 
> The server is using a util called Extremez-IP for Mac Shares; I don't know if that affects the name of volume shares.  Any ideas?
> thanks,
> Bob R.

ATOM RSS1 RSS2