List files and paths in a directory tree (including files in subdirectories)


Recently I needed to list all of the files in a large directory tree. Each line needed to include the full path to the file, and I didn't want to include the directories themselves in the list, just the files. Here's how I did it:

dir /a:-d /s /b > files.txt

The dir command, as you probably know, lists files in the current directory, but the default settings are not useful here - it does not include file path, for one thing.

SQL Convert datetime to just a date


Here is how to use the SQL convert function to extract just the date portion of a SQL datetime field.

convert(varchar(10), eventdate, 101)

It will result in something like this:


You can change the syntax slightly if you want a different date format. Here is the full documentation on the convert function:

Set Application Compatibility through the registry, across a network


Here's how to control Window's Application Compatibility settings through the registry. This is normally controlled by right-clicking on an executable, clicking on the Compatibility tab, and making a selection in the Compatibility mode area. However, you can easily control Application Compatibility for all computers in a domain or network environment through the registry.

The registry key is HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags

Resize Photo Attachments in Outlook 2007

When you attach a picture to an email in Outlook 2007, Outlook can resize the photos for you. Here's how to control this useful feature.

Open Excel 2007 spreadsheets in multiple windows


If you want to open two Excel 2007 windows, each with different spreadsheets, you'll need to check out this tip. I have two monitors, and I need to use two spreadsheets at the same time. By default, you can't open two excel instances at the same time. Here's how to change that.

In case that site or file is unavailable, I am hosting it here myself. Thanks for the tip!

How to create a simple string filter in SSRS


If you are sure you've typed your filter condition correctly, to either include or exclude data based on a string match, try this.

How to rename a report in SSRS (SQL Server Reporting Services)


Here's how to change the name of your SQL Server report.

To rename a report in SSRS (SQL Server Reporting Services), from the Visual Studio environment, fire up the Solution Explorer sidebar. Then, you should see your report(s) in the tree view. Right click the report to rename, and choose "rename". Easy as pie, but hard to figure out.


Subscribe to RSS - tips