This repository contains a collection of powershell scripts that I use in my day to day development activities.
Clone this repository, and start using the powershell scripts.
Head to the jira for the project https://github.com/brgorrie/PowerShellUtilityScripts/issues to raise any issues or feature requests.
This script will iterate through all the subdirectories of the specified directory or if no parameter is supplied all the subdirectories of the current directory. It will check if the directory is for a git repository, and that it has a remote configured. If it does have a remote configured it will then do a git pull to update the local clone of the repository.
Optional parameter that specifies the path to the directory containing subdirectories to check. Defaults to the current directory if no parameters are specified.
PS C:\> cd c:\git
PS C:\git> .\PowerShellUtilityScripts\Scripts\GitPull-AllSubdirectories.ps1
PS C:\git> cd .\PowerShellUtilityScripts\Scripts\
PS C:\git\PowerShellUtilityScripts\Scripts> .\GitPull-AllSubdirectories.ps1 c:\git
This script takes three optional parameters:
- FileExtension: Specifies the file extension to search for and concatenate. If not specified, then the script defaults to "*.cs" files.
- OutputDirectory: Specifies the output directory for the concatenated file. If not specified, then the default directory is "C:\git".
- SearchDirectory: Specifies the directory to search for files with the specified extension. If not specified, then the current directory is used.
The script searches for files with the specified extension in the specified directory and all subdirectories, concatenating them together into a *.txt file in the specified output directory. The output file name is in the following format: All[FileExtension]Files_YYYY-MM-DD_HH-mm-ss.txt, for example, AllCsFiles_2023-02-25_22-50-14.txt.
Optional parameter that specifies the file extension to search for and concatenate. If not specified, then the script defaults to "*.cs" files.
Optional parameter that specifies the output directory for the concatenated file. If not specified, then the default directory is "C:\git".
Optional parameter that specifies the directory to search for files with the specified extension. If not specified, then the current directory is used.
PS C:\> cd c:\git\DiceRoller
PS C:\git\DiceRoller> C:\git\PowerShellUtilityScripts\Scripts\Concetenate-Files.ps1 -FileExtension cs
PS C:\> cd c:\git\PowerShellUtilityScripts\Scripts\
PS C:\git\PowerShellUtilityScripts\Scripts> .\Concetenate-Files.ps1 -FileExtension cs -OutputDirectory C:\output -SearchDirectory C:\git\DiceRoller