Possible Vb Question
-
Hi, We are trying to auto compress files through the command prompt. The problem is the file we would like to compress changes every 15 minutes as it is archived using DTS making it hard to code a specific file name, and we dont want to zip them all up incase the zip file becomes corrupt then we loose them all. We purchased WINRAR command prompt, and need to find a way to write a script, or something that will read the contents of a directory, and give us the most current file that was saved. Has anyone done this, and if so is there code that would be usable somewhere..?? Thanks, -David
-
Hi, We are trying to auto compress files through the command prompt. The problem is the file we would like to compress changes every 15 minutes as it is archived using DTS making it hard to code a specific file name, and we dont want to zip them all up incase the zip file becomes corrupt then we loose them all. We purchased WINRAR command prompt, and need to find a way to write a script, or something that will read the contents of a directory, and give us the most current file that was saved. Has anyone done this, and if so is there code that would be usable somewhere..?? Thanks, -David
Look up the FileSystemObjct on MSDN, or if you fancy doing it by the seat of your pants so to speak, just set a project reference to WindowsScriptingHost (??? - Dunno). With the reference set, something like
set oMyFSO = new WindowsScriptHost.FileSystemObject
Should allow you to access all sorts of objects and methods for dealing with the filesystem (F2 = Object browser which will prob help!) "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox