Question : PowerShell Script to Get Number of Files in Directory and Post to URL

I need a powershell script that gets the number of files in a directory, and posts it to a URL.

This will run on Win2003 Server and Win2008 Server.

For instance:
Dir = C:\myfiles
URL = http:\\myserver.com\mydirectory\filecount.aspx?files=#

Thanks.

Answer : PowerShell Script to Get Number of Files in Directory and Post to URL

This worked for me (using a live.com query)


1:
2:
3:
$url = "http://myserver.com/mydirectory/filecount.aspx?files=$Count"
$webclient = New-Object System.Net.WebClient
$webclient.DownloadString($URL) | out-null
Open in New Window Select All
Random Solutions  
 
programming4us programming4us