Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Explorer

How I can check in real time when user add new file/directory in windows explorer (for example, new file is created in C:winnt) or user rename file or user delete file?

Hope that somebody can help soon...
Thnaks.

Comments

  • DarQDarQ Member Posts: 1,625
    Maybe Windows has an API for that buti would not know about that one! until then, keep scanning and scanning until you find changes. But that means that you give your computer a really hard time so i wouldnt do this is i were you.


    : How I can check in real time when user add new file/directory in windows explorer (for example, new file is created in C:winnt) or user rename file or user delete file?
    :
    : Hope that somebody can help soon...
    : Thnaks.
    :

    [HR]
    [CODE]
    Wot tinkst no wol wr fn my?
    Do mast dy in kear dyn stomme bek tigt hlde.
    Oars mat ik mem Jelsma es op dy wstjoere!
    [/CODE]
    [HR]

  • infidelinfidel Member Posts: 2,900
    : How I can check in real time when user add new file/directory in windows explorer (for example, new file is created in C:winnt) or user rename file or user delete file?
    :
    : Hope that somebody can help soon...
    : Thnaks.
    :

    You need to use Shell extensions to do this. There is an out of print O'Reilly book called VB Shell Programming that shows you how to hook into Explorer's interfaces to make your own context menus, copy handlers, etc. Not sure if you'll be able to find it anywhere, but the source code is available at http://examples.oreilly.com/vbshell/

    I'll just say that extending the shell is not nearly as easy as one would hope. There's a lot of COM interfacing going on and using a special typelib (that I believe is included in the download).

    Or, if you're in to C++ at all, there is a sample program at http://www.relisoft.com/Win32/watcher.html which fires off a messagebox when a folder changes. If I remember correctly, it detects file adds and deletes, but I'm not sure about renaming a file. It would probably get you looking in the right place for that, though.
  • Shawn CarterShawn Carter Member Posts: 0

    ______ ( http://forcoder.org ) free ebooks and video tutorials about || Assembly, Swift, Scratch, C++, R, Objective-C, PHP, Perl, Go, Python, Visual Basic .NET, C#, C, PL/SQL, Delphi, MATLAB, Ruby, JavaScript, Visual Basic, Java Kotlin, Lua, SAS, Scala, Hack, FoxPro, ABAP, COBOL, Erlang, LabVIEW, Apex, Clojure, Alice, Lisp, Prolog, Transact-SQL, D, Scheme, Dart, VBScript, Bash, Rust, Ada, Fortran, Julia, F#, Crystal, Awk, ML, Logo || ____

Sign In or Register to comment.