Hey guys, how do I create a .run bat file to delete map folders with less than 16 tiles in it? I'm fed up of not being able to create a good map cause everytime i look for a folder BAM theres a billion folders in there.
Thanks
Silushun wrote:Hey guys, how do I create a .run bat file to delete map folders with less than 16 tiles in it? I'm fed up of not being able to create a good map cause everytime i look for a folder BAM theres a billion folders in there.
Thanks
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(".\map\")
Set colSubfolders = objFolder.Subfolders
For Each objSubfolder in colSubfolders
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder(objSubfolder)
if Folder.Files.Count < 16 Then errResults = objSubfolder.Delete
Next
BlackKopcap wrote:Silushun wrote:Hey guys, how do I create a .run bat file to delete map folders with less than 16 tiles in it? I'm fed up of not being able to create a good map cause everytime i look for a folder BAM theres a billion folders in there.
Thanks
Here you are, VBS script, put it in client root folder and run. (Call script as mapdeleter.vbs or any you want)
- Code: Select all
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(".\map\")
Set colSubfolders = objFolder.Subfolders
For Each objSubfolder in colSubfolders
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder(objSubfolder)
if Folder.Files.Count < 16 Then errResults = objSubfolder.Delete
Next
Users browsing this forum: No registered users and 3 guests