The following code will list the subfolder in the order it was created.
---------------
Dim FS As New FileSystemObject
Dim FSfolder As Folder
Dim subfolder As Folder
Set FSfolder = FS.GetFolder(sFolderPath)
For Each subfolder In FSfolder.SubFolders
Debug.Print subfolder
Next subfolder
Set FSfolder = Nothing
---------------
My question, is there a way to ReOrder the folders in the drive? In other words, say a list of folder was created like so:
folder_A
folder_B
folder_C
folder_D
Run the program and it will show the folders at that order. Now, what I want to do is change the order without copying the folder and its contents into a temp folder, deleting the original folders, then copying the temp folder back to the order that I want them in. To show something like so:
folder_C
folder_A
folder_D
folder_B
Run the program and it should show the folders at that order. I was hoping that there is an index to the folder list and that I can just reindex the list, but I could not find where it is, if even ever it exist. Please help, anybody out there.
Thanks,
Alex Deveza
---------------
Dim FS As New FileSystemObject
Dim FSfolder As Folder
Dim subfolder As Folder
Set FSfolder = FS.GetFolder(sFolderPath)
For Each subfolder In FSfolder.SubFolders
Debug.Print subfolder
Next subfolder
Set FSfolder = Nothing
---------------
My question, is there a way to ReOrder the folders in the drive? In other words, say a list of folder was created like so:
folder_A
folder_B
folder_C
folder_D
Run the program and it will show the folders at that order. Now, what I want to do is change the order without copying the folder and its contents into a temp folder, deleting the original folders, then copying the temp folder back to the order that I want them in. To show something like so:
folder_C
folder_A
folder_D
folder_B
Run the program and it should show the folders at that order. I was hoping that there is an index to the folder list and that I can just reindex the list, but I could not find where it is, if even ever it exist. Please help, anybody out there.
Thanks,
Alex Deveza