I have a script that extracts the subfolder names. The root folder has a numeral name, which equates to the latest folder created and newest contents. I will need to compare all the folders and copy the "one" folder name with the highest number. I have the path of all the folder names listed after my script. I will need a script to compare the last 4 digits at the end of these paths and determine the one with the highest number. In my case, 4799 would be the highest number or most current folder.
On Error Resume Next
Set FSO = CreateObject("Scripting.FileSystemObject")
For Each Subfolder in Folder.SubFolders