bottomlinemg
asked on
loop through directories and move files
I need help creating a vbs that will
loop through all subdirecotories of a directory called images and move all the files within all the subdirectories to the main directory called images.
once the directory is empty it should delete it (but never delete files - only move them to the main directory)
can someone help me with this
loop through all subdirecotories of a directory called images and move all the files within all the subdirectories to the main directory called images.
once the directory is empty it should delete it (but never delete files - only move them to the main directory)
can someone help me with this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Copy the script below into a new file with a .cmd extension. Change the value of the "root" variable to the path of the images directory. Running the script will move all subfiles up to the images folder and delete any empty folders.
If there are any duplicate files then they will not be moved and their folders will not be deleted.
Open in new window