Hi Bruce, Probably ninety nine percent of WE users have no idea what a vbs file is. Create an app, post it to app central and I will let people on the talk list know about it.
Thanks, Rod -----Original Message----- From: Scripting [mailto:scripting-bounces+rod_hutton=hotmail....@lists.window-eyes.com] On Behalf Of LB via Scripting Sent: Wednesday, July 08, 2015 6:23 PM To: GW Scripting List Subject: Rename .ogg files back to .wav files 'In my haste about 19 people probably had all there .wav files renamed on there default WE App directory. 'Copy the below to fix the problem and place the .vbs file in the default directory. 'Renaming any .ogg files back to .wav files. 'Make a .vbs file and insert this into it: Sub RenameFileExtensions( ByVal OldExt, ByVal NewExt) 'Rename all Old .ogg files back to New .wav files. Dim objShell, objFSO, objFile, Ext Set objShell = WScript.CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") Dim objFolder, currentFolder ' Fetchthe the current folder. Set currentFolder = objFSO.GetFolder( objShell.CurrentDirectory & "\") NewExt = LCase( Trim( NewExt)) OldExt = LCase( Trim( OldExt)) If InStr( OldExt, ".") > 0 Then OldExt = Mid( OldExt, InStr( OldExt, ".") +1) If InStr( NewExt, ".") > 0 Then NewExt = Mid( NewExt, InStr( NewExt, ".") +1) For Each objFile In currentFolder.Files Ext = LCase( objFSO.GetExtensionName( objFile.Path)) if Ext = OldExt then FileName = Left( objFile.Name, Len( objFile.Name) -Len( OldExt)) & NewExt 'Now rename with temp to prevent name conflict then rename temp. TempFileName = objFSO.GetTempName objFile.Name = TempFileName objFile.Name = FileName ' msgBox " New Name: " & objFile.Name End If Next Set currentFolder = Nothing Set objFSO = Nothing Set objShell = Nothing End Sub RenameFileExtensions "ogg", "wav" --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachme nts/20150708/7178ff68/attachment.htm> _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/rod_hutto n%40hotmail.com. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com