Add to Technorati Favorites
Welcome to ThePowerShellGuy.com Sign in | Join | Help

Browse by Tags

All Tags » file   (RSS)

Hey PowerShell Guy!, How Can I Delete Files That Are a Specified Number of Hours Old?

And another translation of a Hey Scripting Guy Article : How Can I Delete Files That Are a Specified Number of Hours Old? dir |? {$_.CreationTime -lt (get-date).AddHours(-8)} | del -whatif or for files not written in the last 8 hours : dir |? {$_.LastWriteTime
Posted by MoW | 2 Comments
Filed under: ,

PowerShell : the power of REPL, -WhatIf and ScriptBlocks as Parameter when moving files

One of the things I like most about PowerShell is how you can use the interactive commandline, commandbuffer and REPL (Read - Evaluate - Print - Loop) to quickly construct a solution, especialy with the -WhatIf parameter. See this IRC chat ( www.PowerShellLive.com
Posted by admin | 1 Comments

Hey, PowerShellGuy ! : I have to move files based on date now too !

The Chat did go on while I made Last blog entry PowerShell : the power of REPL, -WhatIf and ScriptBlocks as Parameter when moving files : [22:29] <generalhan> ok now time to work on something a bit harder ! ... [22:29] <generalhan> i have

Hey, powerShell Guy !How Can I Locate a Word in a Text File and Then Echo Back That Word and Any Remaining Text?

Another translation of an example script from a Hey scripting guy column How Can I Locate a Word in a Text File and Then Echo Back That Word and Any Remaining Text? from VbScript to PowerShell . I made these 2 different versions within minutes : Get-Content
Posted by admin | 1 Comments
Filed under: , ,

PowerShell examples used on ars technica

Ars technica did an article about PowerShell : Microsoft PowerShell rolled into Longhorn Server In this article two PowerShell examples from my blog are used : How to get the uptime of a specific service: $s = gwmi win32_service -filter "name = 'spooler'"
Posted by admin | 9 Comments
Filed under: , , , ,

Hey PowerShell Guy !,How Can I Parse a Tab-Delimited File and Then Save That as a Comma-Separated Values File?

from the Hey Scripting Guy article : How Can I Parse a Tab-Delimited File and Then Save That as a Comma-Separated Values File? gc tab.txt |% {$_.split("`t") |? {$_ -match '='} |% {$r = new-object object} {$r | add-Member -memberType noteProperty -name

Sesame PowerShell : Scripting Text Files

Again I will mimic a Scripting Guy article here in PowerShell, only this time from the Sesame Script series : Sesame Script: Scripting Text Files Preamble As this entry also was written as a training for the International Winter Scripting Games , And
Posted by admin | 6 Comments