Move file to specific folder after upload in forum
Here is how I implemented it using hook_node_insert() function.

function modulealter_node_insert($node) {
    // See if a file has been added
    if ($file_items = field_get_items('node', $node, 'field_file_attachment')) {
        // Get the first file item
        $file_item = array_shift($file_items);

        // Load the file object from the cache/database
        $file = file_load($file_item['fid']);

        // The path to the file is in $file-&gt;uri
        //var_dump($node-&gt;group_audience['und']['0']['gid']);


        //Set the destination folder where do you want to move it
        $destination = "private://filedepot/filedepot/test/".$file-&gt;filename;
        $file = file_copy($file, $destination, FILE_EXISTS_REPLACE);
    }
}