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
-
BlackKopcap
- Posts: 95
- Joined: Sun May 23, 2010 1:46 pm
Re: Map Deletetion.
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
-
h3retostay
- Posts: 213
- Joined: Thu Jul 08, 2010 2:25 am
Re: Map Deletetion.
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
Every time I use this I get a "Path not found" error