Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I am looking for a script, preferably vbs, that can list files opened locally on a system.
I can use the net file command to list files opened through share access, but I am looking to see files opened locally on the system.
I have tried openfiles.exe, turned local on with /local on and rebooted but no luck, I open a file locally, tried .txt and xls files and it lists nothing.
If you could point me to a script sample, it would be appreciated. I am familiar with wmi programming and the like as well.

Thank you.
Posted

1 solution

Would accessing 'My Recent Documents' help?
This script is supposed to that:

Const MY_RECENT_DOCUMENTS = &H8&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_RECENT_DOCUMENTS)
Set objFolderItem = objFolder.Self
Wscript.Echo objFolderItem.Path

Set colItems = objFolder.Items
For Each objItem in colItems
Wscript.Echo objItem.Name
Next
 
Share this answer
 
Comments
micheal_jhones 20-Apr-12 1:34am    
no i want to accessing current runing files name in my system

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900