doc...@gmail.com
unread,Nov 20, 2016, 11:27:17 AM11/20/16You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
In the following code string I would like to echo the current file to the screen.
but i do not want to need to reply to a pop-up box, just continually scroll the active file name so that when the script hangs up I can tell which file it was processing when the error occurred.
dim fso, folderObj, fileList, fileObj, fileName
' Create the file management objects that we need in order to rename our files
set fso = CreateObject("Scripting.FileSystemObject")
set folderObj = fso.GetFolder("M:\Movies\2013\")
set fileList = folderObj.Files
' Set up our search and replacement strings
searchPhrase = "[2013]"
replacePhrase = ""
' Loop through all of the files
for each fileObj in fileList
'''''''' looking to place the WRITE to SCREEN Script here
' Check to see if the search phrase is found in the name of the file
if instr(fileObj.name, searchPhrase) > 0 then
' Rename the file using the VB replace() function to
' yield the correct file name
fileObj.name = replace(fileObj.name, searchPhrase, replacePhrase)
end if
next