.Synopsis Test to see if this host is online and accessible. .Description Sends two pings the the hostname, then attempts to access the admin share for this host. .Parameter HostName Hostname or IP address to be tested. .Parameter skipPingTest This will allow you [...]
Posts Tagged ‘function’
PowerShell: Test-Host
Posted in Code, PowerShell, tagged Code, function, Networking on April 18, 2011 | Leave a Comment »
Recursive File Copier Function
Posted in Code, Programming, VB.net, tagged copier, file, function, recursive on November 23, 2008 | 3 Comments »
Have you ever had the need for a function to copy every file in a directory… wait no longer… here is a recursive way to copy files: Sub CopySelectedFiles(ByVal strSourceDirectory As String, ByVal strDestDirectory As String, ByVal strSearchString As String) Dim dirInfo As New DirectoryInfo(strSourceDirectory) Dim fsInfo As FileSystemInfo For Each fsInfo In dirInfo.GetFileSystemInfos Dim [...]
Recursive File Search Code
Posted in Code, Programming, VB.net, tagged file, function, recursive, search on November 23, 2008 | Leave a Comment »
Below is the first function I’m publishing… It uses my favorite programing feature… recursion. Recursion is a tricky thing to do right. So many loops, so many variables, etc… This function searches for a file and all sub-directories of your root/starter directory. VB.net Source Code: Public Function SearchForFile(ByVal strSourceDirectory As String, ByVal strSearchString As String) [...]




