I would probably create a DataTable object that holds a list of extensions and which folder they are supposed to go into. Then I would loop through the list of files, look up in the DataTable where they are supposed to go, and move them to that location.
As for your permissions questions...try
google[
^].