Jump to content

Recommended Posts

Posted

Hi-

I'm wondering if there is a function that will review a directory and give (more or less) a Yes/No response to whether that directory is currently in use by the user (i.e. they are running a program off the directory, or have a file open from the directory, etc.)?

Or is this a function I would have to script out manually?

Thanks

Posted

HI,

yes I think so, but for what reason?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

yes I think so, but for what reason?

I'm in a retail organization supporting the merchandise planning system. Because we have multiple companies under the parent, we have multiple planning environments. There is a need among the users to be able to switch easily and effortlessly between these environments.

However, when using the evironments, they must be mapped to a specific drive letter (M:\ in this case). I have written the script that allows them to switch back and forth between environments.

But before they actually make the choice, I want to be able to scan there local machine and determine if they are using any files or programs on the drive first. If they are using somethng, I want to prompt them with a warning indicating that they are about to switch drives and anything they are currently doing on that drive will be lost in the switchover.

Where I'm stuck is whether I can have the script they execute read their system and determine if that drive is already in use.

Does this make sense?

  • 3 weeks later...
Posted

Mega-

Any further thoughts on this one?

Thanks

sysinternals.com Tools: Handle, PsFile and Process Explorer. They all show open file handles for various situations.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

Mega-

Any further thoughts on this one?

Thanks

If this is a controlled environment (you know what the users are likely to be doing) you can check to see if the programs are still open with the WinActivate and WinWaitActive sort of commands. If these are artists, you can thereby force them to close out Photoshop for instance.

If the program is really huge though they wont be happy being forced to close and reopen it though.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...