Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBScript - Search and delete MP3 files inside ZIP or archive

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,52400
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> VBScript - Search and delete MP3 files inside ZIP or archive
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBScript - Search and delete MP3 files inside ZIP or ar... - 10/2/2007 9:36:29 PM   
  murugappan

 

Posts: 1
Score: 0
Joined: 10/2/2007
Status: offline
'Script start

strDir = "D:\folderpath"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")

Set objDir = FSO.GetFolder(strDir)
getInfo(objDir)
Sub getInfo(pCurrentDir)
For Each aItem In pCurrentDir.Files
If LCase(Right(Cstr(aItem.Name), 3)) = "zip" Then
wscript.echo aItem.path
objshell.run "c:\7za d " & aItem.path & " *.mp3" 'Download 7za.exe from internet and place the exe in the specified path. Its free download
End If
If LCase(Right(Cstr(aItem.Name), 3)) = "mp3" Then
wscript.echo aItem.path
aItem.delete(True)
End If
Next
For Each aItem In pCurrentDir.SubFolders
'wscript.Echo aItem.Name & " passing recursively"
getInfo(aItem)
Next
End Sub

'Script End

_____________________________

Murugappan
URL: http://orangescripts.blogspot.com
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> VBScript - Search and delete MP3 files inside ZIP or archive Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts