Powershell is the new scripting language for Windows systems. To use this new feature in Windows 7 you don’t need to install anything. We are going to create a Script using Powershell that is going to show those modified files.
Windows 7 is very restrictive with the use of Powershell, so we are going to need to insert the script in a bat file to execute it.
The script
@echo off
Powershell -noexit "Get-PSdrive  | where { $_.Used -gt 0 } | foreach { Get-ChildItem $_.Root -recurse -ErrorAction SilentlyContinue | Where {!$_.PsIsContainer} | Where {$_.DirectoryName -notlike 'c:\windows*' } | Select Name,DirectoryName, LastWriteTime, Mode | Sort LastWriteTime -descending | select -first 20}  | Out-GridView"
The script only displays 20 results, if you want more or less just change the number after select -first.
Open a new notepad. For this use WinKey + R, type notepad and press Enter.Once notepad is open copy the script and you will get something like this:
Save it using the file menu, but don’t forget to use the quotation marks, so notepad will create a bat file.
Click on the save button and a new file will appear.
The test
Open a Wordpad or whatever program you want and write something:
The script only shows the last 30 modified files. In order to obtain better information the hidden files are not displayed. The script doesn’t show if a file has changed in the Windows directory. You have to understand that Windows 7 is doing a lot of work without your notice and this solution try to focus in what the user or the programs has done.
I hope you have enjoyed the reading and find the script useful. So why not letting me know new ideas for a script?
October 29, 2010 @ 7:16 PM
will this script work in xp???
October 29, 2010 @ 9:06 PM
You can install Powershell in Windows Xp is a free download from Microsoft.