Browse by Tags

Tagged Content List
  • Blog Post: Use PowerShell to Create Documents from Template

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to create Word documents from a template. Hey, Scripting Guy! I often need to create a bunch of Word documents. These documents have a number of standard features. Right now, I basically paste the last document I was...
  • Blog Post: Weekend Scripter: Count Images with PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, counts the images he used in Hey, Scripting Guy! Blog posts through the years. Microsoft Scripting Guy, Ed Wilson, is here. I have been writing the Hey, Scripting Guy! Blog for a while…actually, quite a while. It is the best job I have ever had—and...
  • Blog Post: Weekend Scripter: Use PowerShell to Investigate File Signatures—Part 2

    Summary : Windows PowerShell MVP, Boe Prox, concludes this two-part series about investigating file signatures with Windows PowerShell and the .NET Framework. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Boe Prox , for the conclusion of the two-part series he started yesterday...
  • Blog Post: Weekend Scripter: Use PowerShell to Investigate File Signatures—Part 1

    Summary : Windows PowerShell MVP, Boe Prox, talks about investigating file signatures by using Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. This weekend we have a two-part series from guest blogger, Boe Prox … When you work with File Server Resource Manager (FSRM), one...
  • Blog Post: Use PowerShell to Find Files that Have Not Been Accessed

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to find files that have not been accessed for some time. Hey, Scripting Guy! On our server, we have tons of files. Unfortunately, many of them haven’t been accessed for years. I know the cost of storage is coming...
  • Blog Post: Use PowerShell to Find Metadata from Photograph Files

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to obtain metadata from photo files. Hey, Scripting Guy! I need some help. I have thousands of photo files on my computer. I need to bring some order to them. I know that I can use Get-ChildItem from Windows PowerShell...
  • Blog Post: List Music File Metadata in a CSV and Open in Excel with PowerShell

    Summary : Microsoft Scripting Guy, Ed Wilson, shares a function that gets file metadata, and then he writes the information to a CSV file. Hey, Scripting Guy! Getting basic file properties such as the file name, the size of a file, and the directory that a file resides in is pretty cool. But when...
  • Blog Post: Use PowerShell to Create CSV File to Open in Excel

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about exporting a directory list to a CSV file and opening the file in Microsoft Excel with Windows PowerShell. Hey, Scripting Guy! I have a lot of music files that reside in nested folders. I would like to be able to look at the file information...
  • Blog Post: List Files in Folders and Subfolders with PowerShell

    Summary : Use Windows PowerShell to list files in folders and subfolders. Hey, Scripting Guy! I am an old VBScript guy. I love using VBScript, and I have done so for nearly 15 years. One reason I love VBScript so much is that, to me, it is easy to use. It is also very powerful. But after attending...
  • Blog Post: How Can I Delete Specific Files in a Specific Folder?

    Hey, Scripting Guy! How can I access the files in the folder T:\Act and delete any files that have the string “current” somewhere in the file name? -- SC Hey, SC. We have to admit, the notion of deleting anything current has a certain appeal, doesn’t it? Well, not for the Scripting Guys, of course;...
  • Blog Post: How Can I Get a List of All the .dll Files in a Folder, Along with Their Version Numbers?

    Hey, Scripting Guy! How can I get a list of all the .dll files in a folder, along with their version numbers? -- DD Hey, DD. You know, when we sit down to write this column we usually try to start off with an amusing and at least semi-relevant anecdote. In this case, that would mean a cute story about...
  • Blog Post: Use PowerShell to Toggle the Archive Bit on Files

      Summary : Learn how to use Windows PowerShell to toggle file attributes such as the archive bit. Hey, Scripting Guy! I have a number of files that have had the archive bit flipped. Unfortunately, our backup program relies on the archive bit to determine if it has backed up a file recently or if...
  • Blog Post: How Can I Parse a Tab-Delimited File and Then Save That as a Comma-Separated Values File?

    Hey, Scripting Guy! How can I parse a tab-delimited file, and then save the resulting information as a comma-separated values file? -- DM Hey, DM. You know, yesterday morning the Scripting Guy who writes this column had to scrape the ice off his windshield; today it’s much warmer – 44 at last report...
  • Blog Post: How Can I Monitor the Number of Files in a Folder?

    Hey, Scripting Guy! We have a third-party application that rarely crashes; however, when it does crash it seriously disrupts our business. We can always tell when the application is getting ready to crash; at that point, one of its directories starts filling up with log files. How can we be notified...
  • Blog Post: Use PowerShell to Copy Files to a Shared Drive

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to copy a script collection to a shared network drive. Microsoft Scripting Guy, Ed Wilson, is here. Well, it is Monday in Charlotte, North Carolina, in the United States. Today is a cardio day. I spend the day running...
  • Blog Post: Hey, Scripting Guy! How Can I Find the Number (and Size) of All the Files Recently Modified or Added to a Computer?

    Hey, Scripting Guy! I'm looking for a script that can search a file server and list the number and total size of files that have been recently modified or added to the server. Any help would be appreciated! -- KT Hey, KT. Before we launch into today’s column we thought we should tell you that the...
  • Blog Post: Hey, Scripting Guy! Can I "Unlock" a Read-Only File, Edit it, and Make It Read-Only Again?

    Hey, Scripting Guy! We have a number of files that we need to access at work from time to time. To protect these files, we make them read-only. This works great from a file protection standpoint, but it is really annoying when I need to make updates to the file because about half the time I will open...
  • Blog Post: Hey, Scripting Guy! How Can I Move Files Based on a Portion of the File Name?

    Hey, Scripting Guy! I have tens of thousands of files that all have a file name that includes a number bounded by two underscore characters; for example, P_19_L00.jpg. I need to figure out which number is embedded in a file name, then move that file to a folder named after that number. In this case,...
  • Blog Post: How Can I Provide a Visual Indicator When Copying Files?

    Hey, Scripting Guy! How can I provide a visual indicator of some kind when copying a large file or large set of files? -- SK Hey, SK. Before we do anything else we should note that the Scripting Guys – or at least the Scripting Guy who writes this column – don’t believe in moral victories. It’s nice...
  • Blog Post: How Can I Tell if a Folder Has Any Files with a Specific File Extension?

    Hey, Scripting Guy! How can I verify whether or not any files with a specific file extension exist in a folder? -- GM Hey, GM. This is actually a pretty easy thing to do. All we have to do is write a WMI query that includes the path of the folder we want to check as well as the file extension we’re...
  • Blog Post: Use PowerShell to Explore Nested Directories and Files

    Summary : The Microsoft Scripting Guy talks about using the Get-ChildItem cmdlet to find, sort, and count folders. Microsoft Scripting Guy, Ed Wilson, is here. In the summer, one’s heart turns to, well, numbers if one happens to work for Microsoft. Yes, it is review season. During review season...
  • Blog Post: Hey, Scripting Guy! How Can I Check for the Presence or Absence of a Text File?

    Share this post: Hey, Scripting Guy! We use text files in special folders to determine if we have performed an operation on a computer. For example, we might install a piece of software on a computer. While it is possible to query the Win32_Product WMI class...
  • Blog Post: Hey, Scripting Guy! How Can I List All the Duplicate Files in a Folder and Its Subfolders?

    Hey, Scripting Guy! How can I list all the duplicate files (that is, files with the same file names) in a folder and its subfolders? -- GK Hey, GK. We have to apologize, but you picked a bad day to ask a question. That’s because the Scripting Guy who writes this column is working on his biography...
  • Blog Post: Can I Use a Script to Rename All the Files in a Folder?

    Hey, Scripting Guy! Can I use a script to rename all the files in a directory and include a "pl-" prefix plus the original file name? -- JP Hey, JP. It’s interesting how many people need to do something similar: they need to rename all the files in a given folder, either by appending the date, changing...
  • Blog Post: How Can I Unhide All the Files in a Folder?

    Hey, Scripting Guy! How can I run a script to unhide all the files in a folder? -- GA Hey, GA. You know, when one of the Scripting Guys was a bit younger he and the other kids in his neighborhood spent countless hours playing variations on hide-and-seek; in fact, this Scripting Guy still has vivid...