command line - Microsoft VBScript runtime error: Input past end of file error -
i getting error:
"c:\se2.vbs(28, 6) microsoft vbscript runtime error: input past end of file"
when run script (i italicized line 28):
dim strinput dim filesys dim path set filesys=createobject("scripting.filesystemobject") set objfso = createobject("scripting.filesystemobject") set ofso = createobject("scripting.filesystemobject") objstartfolder = "c:\program files\apache software foundation\tomcat 7.0_tomcat7_1010\webapps\geniisys\" 'directory search objtempfolder = "c:\users\njediaz\desktop\temp\" objoutputfile = "c:\users\njediaz\desktop\output\files.txt" strinput = inputbox("enter file search (case sensitive):") strsearchfor = strinput showsubfolders objfso.getfolder(objstartfolder) sub showsubfolders(folder) 'wscript.echo folder.path each objfile in folder.files ' wscript.echo folder.path & "\" & objfile.name path = folder.path & "\" & objfile.name
if instr(ofso.opentextfile(path).readall, strsearchfor) > 0 then
filesys.copyfile path , objtempfolder & objfile.name else wscript.sleep (100) end if next each subfolder in folder.subfolders showsubfolders subfolder next end sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'script log common files set fs = createobject("scripting.filesystemobject") 'log file name set logfile = fs.opentextfile(objoutputfile, 2, true) 'directory want listed set folder = fs.getfolder(objtempfolder) set files = folder.files each file in files logfile.writeline(file.name) next logfile.close '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'script delete const deletereadonly = true set objfso = createobject("scripting.filesystemobject") objfso.deletefile(objtempfolder & "*"), deletereadonly msgbox "done."
help please! thanks!
looks 1 of files has 0 size. evidence:
option explicit const forreading = 1 dim gofs : set gofs = createobject("scripting.filesystemobject") dim ofile each ofile in gofs.getfolder("..\data\26878933").files wscript.echo ofile.path, ofile.size wscript.echo ofile.openastextstream(forreading).readall() wscript.echo "------" next
output:
cscript 26878933.vbs ..\data\26878933\a.txt 3 ------ ..\data\26878933\b.txt 0 26878933.vbs(10, 5) microsoft vbscript runtime error: input past end of file
Comments
Post a Comment