Printable Version of Topic

Click here to view this topic in its original format

Dream.In.Code _ VB6 _ Accessing the files in a compressed folder

Posted by: Lcubed 30 Dec, 2008 - 06:46 AM

Hi.
I am compressing regularly scheduled backup files. Using VBScript, I want to programmatically compare the modified date of the files in the compressed folder with the date of the original files before removing the originals. When I try accessing a file in the compressed folder using the same method as accessing a file in a regular folder, I get a VBS runtime error, "file not found" (800A0035) on line 11. Is there a way to do this?
Thanks.
Here is my code so far.

CODE

Option Explicit
dim objshell
dim objFSO1
dim objFile1
dim objFSO2
dim objFile2
Set objShell = CreateObject("Shell.Application")
Set objFSO1 = CreateObject("Scripting.FileSystemObject")
Set objFile1 = objFSO1.GetFile("e:\Jantek\1-Tuesday-FULL-Jantek.bkf")
Set objFSO2 = CreateObject("Scripting.FileSystemObject")
Set objFile2 = objFSO2.GetFile("e:\Jantek.zip\1-Tuesday-FULL-Jantek.bkf")
if objFile2.DateLastModified = objFile1.DateLastModified then
    msgbox "yes"
else
    msgbox "no"
end if

Posted by: reyben_89 2 Jan, 2009 - 08:07 AM

i think you cannot access that file in the compressed mode because in my experience the file found in the compress mode will save temporalily in temp folder if you don't decopress it.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)