Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking to echo Current File being processed to Screen

24 views
Skip to first unread message

doc...@gmail.com

unread,
Nov 20, 2016, 11:27:17 AM11/20/16
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

mike.j...@gmail.com

unread,
Feb 12, 2017, 10:25:36 AM2/12/17
to
Use wscript.echo, but invoke the script with cscript.exe, not wscript.exe.
0 new messages