|While this is not really an "Excel project", VBA has the ability to do what you want.|
The following code is a combination of snippets I've found on the web and have used in the past for various projects. It appears to do what you want, based on the assumptions listed below.
Obviously I don't have your folders or paths to work with, so you are going to have to modify some of the path strings to match your specific situation.
Assumptions (the way it worked for me)
1 - All files to be moved are in a folder on my Desktop named VidSrc
2 - All files have a 3 letter extension e.g. .xxx In order to create a folder based on the File Name, I strip off the last 4 characters of the File Name e.g. .xxx
3 - All folders will be created in a folder on my Desktop named VidDst. After each folder is created, the file will be moved from VidSrc to the newly created folder. VidDst must exist on the Desktop before the code is run.
4 - The File Names can't have any characters in them that would prevent the name from being used as a Folder name.
I suggest that you create a folder called VidSrc that contains copies of a few of your videos to test this with. It should only move the files to VidDst, but I can't take any blame if something goes terribly wrong.
To run the code, follow these steps:
1 - Open an Excel workbook
2 - Press Alt-F11 to open the VBA editor
3 - Click on Insert...Module
4 - Copy and paste all of the code below into the pane that opens
5 - Modify the paths to match your paths
6 - At the top of the window, click on Tools...References
7 - If you don't see Microsoft Scripting Runtime as one of the references checked at the top of the list, scroll down to Microsoft Scripting Runtime and place a check mark next to it and then click OK.
8 - Click inside the MoveAllFiles macro to place the flashing cursor anywhere inside that section of code.
9 - Press F8
10 - Assuming you get no errors, press F8 a couple of more times until the yellow line jumps down into the MoveFiles macro section.
11 - Keep pressing F8 through at least one loop to see if any errors pop up.
12 - If you don't get any errors, check the VidDst folder to see if a folder was created and a file moved.
13 - If everything looks OK, go back into the VBA editor and either continue to press F8 to Single Step through the code or press F5 to let it run on it's own until done.
I'm sure you'll have questions, so come on back when you do. Good luck!
Public FsO As FileSystemObject
'Trigger Sub - Run Me
Set FsO = New FileSystemObject
MoveFiles FsO.GetFolder("C:\Documents and Settings\DerbyDad03\Desktop\VidSrc")
Set FsO = Nothing
Public Sub MoveFiles(fldr As Folder)
Dim fiL As File
'Loop through Files
For Each fiL In fldr.Files
'Create folder from file name with 3 letter extension
MkDir "C:\Documents and Settings\DerbyDad03\Desktop\VidoDst\" & _
Left(fiL.Name, Len(fiL.Name) - 4)
'Set path to move file from
StrMoveFrom = fiL.Path
'Set path to move file to
StrMoveTo = "C:\Documents and Settings\DerbyDad03\Desktop\VidDst\" & _
Left(fiL.Name, Len(fiL.Name) - 4) & "\"
'Move the file
FsO.MoveFile StrMoveFrom, strMoveTo
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.