malik641
10-10-2006, 10:36 AM
Hey guys,
I've recently been playing with file manipulation and after some research I found a nice way to organize some mp3s into 2 seperate folders based on the Album title:
Sub MusicFilesMove()
Dim Disc1 As String, Disc2 As String
Dim objShell As Object, objFolder As Object, FileName As Variant
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Dane Cook\")
Disc1 = objFolder.Items.Item.path & "\Retaliation Disc 1\"
Disc2 = objFolder.Items.Item.path & "\Retaliation Disc 2\"
For Each FileName In objFolder.Items
Select Case objFolder.GetDetailsOf(FileName, 17)
Case "Retaliation (Disc 1)"
Name objFolder.Items.Item.path & "\" & FileName As Disc1 & FileName
Case "Retaliation (Disc 2)"
Name objFolder.Items.Item.path & "\" & FileName As Disc2 & FileName
End Select
Next FileName
End Sub
I was wondering if anyone knows of a good source to learn more about the shell object....it was very difficult for me to get the right path (as shown in bold in my code) because I thought that it would be objFolder.Path rather than objFolder.Items.Item.path
I mean, this serves it's purpose..but I'm much more interested on what else I can do. So I'm looking to find it's methods, properties, collections, etc :)
Thanks
I've recently been playing with file manipulation and after some research I found a nice way to organize some mp3s into 2 seperate folders based on the Album title:
Sub MusicFilesMove()
Dim Disc1 As String, Disc2 As String
Dim objShell As Object, objFolder As Object, FileName As Variant
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\Dane Cook\")
Disc1 = objFolder.Items.Item.path & "\Retaliation Disc 1\"
Disc2 = objFolder.Items.Item.path & "\Retaliation Disc 2\"
For Each FileName In objFolder.Items
Select Case objFolder.GetDetailsOf(FileName, 17)
Case "Retaliation (Disc 1)"
Name objFolder.Items.Item.path & "\" & FileName As Disc1 & FileName
Case "Retaliation (Disc 2)"
Name objFolder.Items.Item.path & "\" & FileName As Disc2 & FileName
End Select
Next FileName
End Sub
I was wondering if anyone knows of a good source to learn more about the shell object....it was very difficult for me to get the right path (as shown in bold in my code) because I thought that it would be objFolder.Path rather than objFolder.Items.Item.path
I mean, this serves it's purpose..but I'm much more interested on what else I can do. So I'm looking to find it's methods, properties, collections, etc :)
Thanks