1 Replies - 2712 Views - Last Post: 02 January 2009 - 09:07 AM Rate Topic: -----

#1 Lcubed   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 30-December 08

Accessing the files in a compressed folder

Posted 30 December 2008 - 07:46 AM

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?
Here is my code so far.
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"
	msgbox "no"
end if

Is This A Good Question/Topic? 1

Replies To: Accessing the files in a compressed folder

#2 reyben_89   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 69
  • Joined: 30-November 08

Re: Accessing the files in a compressed folder

Posted 02 January 2009 - 09: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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1