File Moving With Shell Scripts??

Ok, I’m a command line and shell script idiot, and I can openly admit that. And I can also admit that I am in need of help and am more than willing to beg for such help. With that said, let’s look at my issue, shall we :wink:

I have a few hundred Macs that are being installed as new or are coming in for final conversion from Classic to OS X (yes it is a corporate environment, things move slower here). Due to corporate policy, there are several pieces of software that need to be ripped off each and every hard drive after being rebuilt for OS X (10.3.x). I have tried a basic AppleScript, but at each step of the script where I move an item from a protected location (i.e. from Applictions, System, etc.) it prompts me for an Admin Password. The number of items I am shifting around requires quite a few password entries.

I know you can do shell scripts and have them execute with admin privileges, and that is great… now I just need to know what the command for moving an item from “:System:Library:Item” to the trash is. Thanks a ton!

–PEACE–

Why do I always post the topics that no one responds to? I guess so I can spend the weekend deciphering man pages into proper english. Anyway, to reply to my own post, here is what I found out…

To Delete a file use rm:

do shell script "rm /FileName" password "ADMIN PASSWORD" with administrator privileges

To Delete a Folder use rmdir:

do shell script "rmdir /FolderName" password "ADMIN PASSWORD" with administrator privileges

To Make a new Folder use MKdir:

do shell script "MKdir /FolderName" password "ADMIN PASSWORD" with administrator privileges

To Move a File or Folder use mv:

do shell script "mv /StartFolder/FileName /EndFolder" password "ADMIN PASSWORD" with administrator privileges

anyway, those are the basics… and after searching for this info I have come up with one simple question… What the heck is wrong with people who write man pages and why can’t they make that info easier to find? Stepping off soapbox now :stuck_out_tongue:

–PEACE–