Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 271195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:07:23+00:00 2026-05-12T00:07:23+00:00

Conditions: Windows 98 SE WMI not available I have code that looks like this,

  • 0

Conditions:

  • Windows 98 SE
  • WMI not available

I have code that looks like this, written using my steroidal wrapping of VBScript using MSScript.

do
    a = files.collectfiles( "c:\userver", "" )
    for i = 0 to ubound( a )
        f = a(i)
        if strings.endswith( f, ".usv" ) then
            d = files.readfilee( f )
            on error resume next
            executeglobal d
            nErr = err.number
            sErr = err.description
            on error goto 0
            if nErr <> 0 then
                trace "*** Error " & nErr & ", " & sErr
            end if
            files.deletefile f
        end if
    next
    system.sleep 10
    system.cooperate
loop

There’s a lot of disk activity with that call to files.collectfiles. Is there some way of detecting a change in the contents of a folder without actually scanning the folder for files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:07:24+00:00Added an answer on May 12, 2026 at 12:07 am

    Define “change in the contents of a folder”.

    If it means that a file was added, deleted, or renamed, then the modified timestamp of the folder is updated whenever such an event occurs.

    If you’re instead wanting to know when files are modified, then you’ll need to read them.

    That said, looking at what you’re trying to do (scan a folder for new .usv files, and process them and delete them), then just keeping track of the timestamp on the folder and updating it right before you call collectfiles is best (note that the correct time to log is just BEFORE calling collectfiles, otherwise you run the risk of not waking up if a file gets added during the collectfiles call or immediately afterward).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a Windows service written in C#. Under rare conditions it fails
I have a set of conditions in my where clause like WHERE d.attribute3 =
I have written a Windows service which should turn the display OFF when certain
I have a standard windows server that inherits from the ServiceBase class. On the
Conditions: OS is Windows XP have LPT port LED light bulb is connected to
I have a windows service exe that is compiled as x86, amd64, and Itanium.
Python 2.7, Windows XP. I have a server that sends messages to client(s). I
There are certain conditions that can cause stack overflows on an x86 Linux system:
I have an if statement with two conditions (separated by an OR operator), one
Basically I’ve heard that certain conditions will cause .NET to blow past the finally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.