Hi all,
I am creating upload files using with upload file with directory structure like this :

(Category)
- Home Appliance (Bath rooms, Bedrooms)
- Office Appliance
- Vehicle (land vehicles, air vehicles)
-subcategory (Bath rooms)
-item folder Brush
Brush1.jpg
Brush2.jpg
Brush3.jpg
so on….

This mean every newly uploaded files when it’s new (not exist on the subcategory item folder) it create new folder…

What I really confuse is what if user edit the item throught my view (he change the brush folder to Vehicle category with subcategory land vehicle).

After updating database of item, How can I move the brush folder (directory) and rename all brush images to car with number prefix. After image file name ?