coerce list into real files to move? via Akua

Ok, folks. I sure could use a nudge here. I’m using Akua’s “entries in… to a depth of…” command to get a list of files based on label criteria. And it’s working beautifully. However, later in my script, I now need to take the ACTUAL files and MOVE them.

set badStudio200 to the entries in studio200folder whose labels are in {5} to a depth of 10 

How do I coerce this list to files I can move?
Many, many thanks in advance.
T.J. Mahaffey

: Ok, folks. I sure could use a nudge here. I’m using Akua’s
: “entries in… to a depth of…” command to get a
: list of files based on label criteria. And it’s working
: beautifully. However, later in my script, I now need to take
: the ACTUAL files and MOVE them.

: set badStudio200
: to the entries in
: studio200folder whose labels are in
: {5} to a depth of 10

: How do I coerce this list to files I can move?

: Many, many thanks in advance.
: T.J. Mahaffey

Let’s say you want to move the 5th element to thisfolder you can do :
If studio200folder is a string

tell application "Finder"
	move (alias (studio200folder & item 5 of badStudio200)) to (thisFolder)
end tell

If studio200folder is an alias

tell application "Finder"
	move (alias (studio200folder as string & item 5 of badStudio200)) to (thisFolder)
end tell

I need to move ALL the files I’m picking up in the list created by either lines 2 or 3 below. I’m going to move badStudio200 to one folder and the files from dupeStudio200 to another folder.

set studio200folder to alias "HFS Volume:DB_Staging:200 Studio - Database:"    
set badStudio200 to the entries in studio200folder whose labels are in {5} to a depth of 10
set dupeStudio200 to the entries in studio200folder whose labels are in {2} to a depth of 10

Many thanks for your input. I’ve fought this all morning and finally have hammered out a working prototype. Here are the applicable excerpts. Although I was at first thrown by your example which pulled only ONE item from the list to process it, I was able to use what you were saying to understand how I might apply that to ALL the items in the liist.
The final breakthrough came as I went for another cup of coffee: a repeat loop. (When this worked, I had to go and find a coworker to hug.) g

set studio200folder to alias "HFS Volume:DB_Staging:200 Studio - Database:"  
set badStudio200 to the entries in studio200folder whose labels are in {5} to a depth of 10
set dupeStudio200 to the entries in studio200folder whose labels are in {2} to a depth of 10    
repeat with a in badStudio200
	move file ((studio200folder as text) & a) to folder "Problem_Data" of studio200folder
end repeat
repeat with D in dupeStudio200
	move file ((studio200folder as text) & D) to folder "Problem_Duplicates" of studio200folder
end repeat

Thanks again for your time, Jean_Baptiste

There is a far easier solution. If you’ll look at the dictionary entry for “the entries in” you’ll find an “as” parameter. Tell it to return your entries “as alias” and you’ll be able to plug the resulting list directly into a Finder move command.
Marc K. Myers
Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[02/21/2002 12:01:46 PM]