vbscript - Moving Files by name -
i'm working on vbs determine following:
is file *.dbf? is file name numeric?a yes both questions allow script move said file folder. here's have far:
set objfso = createobject("scripting.filesystemobject") objstartfolder = "d:\folder" set objfolder = objfso.getfolder(objstartfolder) set dirfiles = objfolder.files dim ofile each objfile in dirfiles if "dbf" = lcase(objfso.getextensionname(objfile.name)) if isnumeric(objfso.getbasename(objfile.name)) objfso.movefile drivespec,"d:\deletable\" end if end if next
for reason though i'm receiving error on line 9 files not beingness found. i'd added msgbox(objfile) , know much works enough, missing here?
objfso.movefile drivespec,"d:\deletable\"
change drivespec
objfile.path
vbscript
No comments:
Post a Comment