I commonly write applications that will write a new log file every day, and as you can imagine, over time this be be quite a task to keep things clean and tidy. I recently found that LINQ is perfect for this scenario.
Just be sure to have a reference to System.IO and then here is the code you need:
C#
1
2
3
4
5
6
7
8
| var query = from o in Directory.GetFiles("/YourFolder", "*.*", SearchOption.AllDirectories);
let x = new FileInfo(o);
where x.CreationTime <= DateTime.Now.AddMonths(-6);
select o;
foreach (var item in query)
{
File.Delete(item);
} |
VB
1
2
3
4
5
6
7
8
9
10
| Dim query = _
From o In Directory.GetFiles("/YourFolder", "*.*", _
SearchOption.AllDirectories) _
Let x = New FileInfo(o) _
Where x.CreationTime <= DateTime.Now.AddMonths(-6) _
Select o
For Each item In query
File.Delete(item)
Next item |
Summary
The code above will find all files older than 6 months, and delete them. Be sure if you use this code to update the search directory, and to change the search pattern (“*.*”) to only delete the files you intend to delete.
Popularity: 100%
Maybe you recently installed Windows, and now you found this page because you are looking for the driver for a device called SM Bus Controller that is in your device manager with a yellow question mark, or maybe an exclamation mark?
Here is the issue:
- Windows did not find the driver for the device: SMBus Controller?
- The device manager shows a yellow question mark for the SMBus Controller?
- The device manager lists the SMBus controller under Other Devices?
The SMBus Controller is the System Management Bus device that controls low-speed system management communications. This device is common to most Intel chipsets.
To fix this issue you can simply download and run the Intel Chipset Software Installation Utility. This download will install the chipset driver files so Windows can properly recognize the chipset’s built-in SMBus Controller.
This will apply to the following Operating Systems:
Windows 98, Windows 98 SE, Windows 2000, Windows Me, Windows XP Professional, Windows XP Home Edition, Windows XP Tablet PC Edition, Windows Server 2003, Windows XP Media Center Edition, Windows 2000 Server, Windows 2000 Advanced Server
Popularity: 28%
So you need to find out what ports are currently being used in Windows and don’t know where to start?
Here is a quick way to find out what ports are open or exposed:
Click: Start -> Run and type: cmd {enter}
At the command prompt type:
Netstat will display a list of all listening ports, and for established connections it will show who’s on the other end.
Popularity: 19%
Recent Comments