I have having a very strange occurrence when looping through a text
file.
objective:
Loop through text file list of username and then rename their
corresponding folder to username.old.
sounds simple.....
Code:
Dim objFSO
Dim ulist
On Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set ulist = objFSO.OpenTextFile("ren2.txt",1,False)
Do Until ulist.AtEndOfStream
WScript.Echo ulist.ReadLine
objFSO.MoveFolder "z:\profilerename\folders\"&uname, "z:\profilerename
\folders\"&uname&".old"
Loop
If I run the code with the action commented out I am able to enumerate
all the names.
But, when I am performing the action it is actually skipping lines for
the text file.
Ex. It would show it was working on line1 but actually do line2.
Very bizarre
Has anyone seen anything like this before?
Paul