On-the-fly actions in Folder Actions

when using folder actions (triggered by items being added to a folder)
is it possible to direct the incoming files straight to the folder’s subdirectory that is being created on-the-fly??

this is what the scenario would look like if it is possible to accomplish the above:

  • files are dropped on the folder (one with script attached)
  • they never appear in this particular directory, instead they go directly to a subfolder, which…
  • is being created (with whatever name) as actions of files being dropped occurs

Browser: Firefox 1.0.1
Operating System: Mac OS X (10.4)

Sure:

on adding folder items to this_folder after receiving these_items
tell application "Finder"
set subfolder to make new folder at this_folder with properties {name: "folder name here"}
move these_items to subfolder
end tell
end adding folder items to

Browser: Safari 412
Operating System: Mac OS X (10.3.7)

this works in the end, thanks…

the only thing that concerns me is that I see the file sitting in the container folder for few moments
I don’t know if it’s just how it displays or this file actually resides in the container folder for few seconds

the reason why I don’t want nothing in the container folder is that the folder would be residing on a server therefore could be accessed by multiple users at the same time, if two users drop their files in, the script could get confused as to which files should be moved to what subfolder (they have to remain as two separate packages) or can I somehow tell the script to identify the files based on source they’re comming from so that it would know not to confuse them with others? or perhaps does it know that by default? (the actual drop scripts linked to the hotfolder would sit locally on workstations)