Jump to content

A list of files recently saved by the user

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
Is there a way to get a list of files recently saved by the user using any programs in Windows?

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,715 posts
In the registry, look under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs.

#3
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
that is a list of documents recently opened, not documents recently saved.

#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I don't know of any pre-made list but you could scan the computer and look at each files modified date. This wouldn't be a short process.

#5
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
It does not work too.
Some files could be created/modified by windows, especially during installation of new programs, etc.

Thank you for the replies so far.
This problem is hard, I see no windows API could provide the function.

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,715 posts
So what kinds of files are you mainly looking for, exactly? System files, or user files?

#7
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
user files, all files saved by the user in any programs in the last 3 days.

#8
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,715 posts
I think you'd have to do a search for that, like Jordan suggested, but limit it to places where users typically save files like in C:\Documents and Settings (or C:\Users on Vista)

#9
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
thinking the same thing, it is an "approximation" to the real solution.
if the real solution could not be found, I am prepared to use the "approximation".

I am thinking, when a user is saving a file, there should be a file handle being used.
win32 api does provide a function to extract info from a file handle, the question is,
how do I get the list of file handles?

#10
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,715 posts
That wouldn't work. Handles aren't global - handle 0x00000004 on Process A could point to something else on Process B, or be invalid. I think there's a handle duplication API function, but I can't remember at the moment.

#11
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,715 posts
Once again, I've proven myself wrong.

Enumerating process handles

There's an undocumented command ID you can pass to this function called SystemHandleInformation. There's nothing about it on MSDN, but someone figured it out. You do have to elevate your privilege levels to execute the function, though. This'll probably set off Vista's UAC, but it should be okay on previous versions of Windows.

EDIT:
Source code for doing almost exactly what you wanted to do: OSR's ntfsd List: ObQueryNameString doesn't return

#12
kakarukeys

kakarukeys

    Newbie

  • Members
  • PipPip
  • 20 posts
Thank you. That helps.