Hello DaniWeb,
I have a new idea for an app:
I have an external harddrive and I usually backup my desktop with a cleanup folder which I usually move to the external harddrive.
The problem is: when I search for a file (i.e. example.mp3) I will find multiple copies which are taking up way too much space.
Is there an app or some code that can search for an extension (i.e. .mp3)
and if it finds more than one copy of the same file, it can delete the extra file?
The reason I ask is: I have around 1300 different mp3s on my external harddrive and most of them are extra copies of the same mp3.
When I search for the extension mp3 and I want to move all of the mp3s to a single folder I am prompted way too many times for overwriting or keeping the same mp3 file.
I need an app that can force the move without prompting and delete the extra copies; so, I am left with only one copy of each.
i.e.
mp3 files on external hard drive for backup:
song.mp3 > in one folder
song.mp3 > in another folder
song.mp3 > in another folder
song2.mp3 > in one folder
song2.mp3 > in another folder
etc...
I want to consolidate all my mp3s in one folder:
foldertomoveto/ song.mp3
foldertomoveto/song2.mp3
Below is start:
For Each foundFile As String In My.Computer.FileSystem.GetFiles( _
My.Computer.FileSystem.SpecialDirectories.MyDocuments, _
FileIO.SearchOption.SearchAllSubDirectories, "*. & textbox1.text.trim())
'HERE WILL BE AN IF STATEMENT TO VALIDATE IF THERE IS MORE THAN ONE MP3 (ETC...) FILE
'WHICH WILL DELETE THE MULTIPLE COPIES AND KEEP ONLY ONE
'I MIGHT NEED A CHECKEDLIST BOX TO VALIDATE
Dim foundFileInfo As New System.IO.FileInfo(foundFile)
My.Computer.FileSystem.MoveFile(foundFile, "C:\StorageDir\" & foundFileInfo.Name)
Next
The other copies have been deleted.
Any hints?
Thanks in advance,
M1234ike