Need program to create & sever aliases

Scholarly library’s urgent need for computer program to: (1) w/one command, batch-make aliases of (e.g., 10,000) pdf documents and (1,000) enclosing folders (hierarchical subject-indexed); and (2) with one command, sever the links between the originals and aliases --leaving (3) hierarchically unaltered openable folders, housing readable document labels.

Has such a program been written?
I activated an account, posted a synopsis of the need; a few people read it – but no response
I probably should have posted and titled it differently, but poor computer vocabulary.(and poor retentive skills in this domain) makes it frustratingly hard to access knowledgable people within a potentially helpful website community, such as yours.
Our tools include Tiger, Panther, and Acrobat Pro7
Please email Miles Storfer


I don’t understand exactly what you’re doing and why you would want to sever the links, but here’s a simple of example how you can sever the link using a temp item:

tell application “Finder”
set f to make new folder at desktop with properties ¬
set t to make new folder at desktop with properties ¬
set a to make alias file to f
open a
set original item of a to t
delete t
empty trash
delay 1
open a
end tell

Basically, you point the alias to the temp folder and trash that folder.



I’m not sure you need to make aliases of the files but just duplicates. Are all 1000 folders contained in a single folder or are they in different locations? The Finder pretty well sorts everything that is in a folder when it is placed there (except maybe the desktop) so are the names of all the files in the 1000 folders named in such a way that they need to be sorted by a part of their name that is not at the beginning of the file name?

Here’s something I put together but it will probably need to be adjusted for your needs. It assumes that there is one folder containing all the folders with the files. If there is more than one folder containing other folders with files it will need to be “looped” so all files are duplicated.

Hope this helps some.

display dialog "Name the folder for the new documents storage." default answer ""
set foldName to text returned of the result -- these two lines set your folder name for the new location of the duplicated files.
choose folder with prompt "Choose destination for the new files."-- this line lets you select where you want the new folder for duped files.
set destPath to result
set destName to destPath as string
set fulDest to destName & foldName
choose folder with prompt "Choose folder with files for duplication."-- this lets you select the container with files for duplication.
set dupFold to result
set theList to {}
tell application "Finder"
	make new folder at destPath with properties {name:foldName}-- this makes a new folder with the name you gave it in the folder you previously selected.
	set theFolds to every folder of dupFold as alias list
	set t to sort theFolds by name
	repeat with newFold in t
		set thisName to name of newFold
		make new folder at fulDest with properties {name:thisName}-- this creates a new folder with the original's name.
		set fileDest to result-- this is the path to the newly created folder
		set theFiles to every file of newFold
		set s to sort theFiles by name -- sorting all the files that are to be duplicated.
		repeat with i in s
			duplicate i to fileDest-- duplicating the files to new location.
		end repeat
	end repeat
end tell

This script does not alter the original file but if the original file (pdf’s) were saved with the ability to be edited then it may be possible for people to alter the pdf’s that were duplicated. Just a thought.


Model: dual 1.8 G5
AppleScript: 2.1 (80)
Browser: Safari 412.5
Operating System: Mac OS X (10.4)