Moving folders that contain some information

I’m trying to write a script at work so I can move customer folders that have been billed to an archive folder. When I run the script I want to be able to enter a job number and not the whole folder name ie… (customer folder is called “0001 - bobs”) I want to only type in the 0001 in the dialog window and have applescript find it in my customer folder and move it to an archive folder. I am kind of new to applescript.

help…

thanks, eekabob

Hi,

I wrote my first ‘do shell script’ all on my own with ‘find’ and I realized that applescript can do this

set c_folder to (choose folder with prompt “Choose the customer folder:”)
set a_folder to (path to desktop) – archive folder
display dialog “Enter the job number:” default answer “00000”
set j_num to text returned of result
tell application “Finder”
move (every folder of c_folder whose name begins with j_num) to a_folder
end tell

:shock:
gl,

Thanks, but I keep getting an error saying "can’t get every folder of the folder “jobs_Volume:Customer Jobs”. I am trying to move files that are on a server to an archive folder on the same server. Didn’t know if that made a difference.

hi,
your utility is exactly what i need…when i run it i just get a blank window

=(

Hi eekabob,

I don’t have a network connection and don’t know much about remotely moving stuff so someone else might reply.

To use remote apps you need to specify the machine name along with the app. So for Finder, you would use something like:

tell app “Finder” of machine “MachineName”
– statements
end tell

I don’t know what the name or where the archive folder is so I can’t speculate, but maybe you can figure it out with some testing.

gl,