< Back

Get-FilesFromRepo

Mon Jan 13, 2020 8:46 pm

NAME Get-FilesFromRepo



SYNOPSIS

This downloads files from a GitHub Repository





SYNTAX

Get-FilesFromRepo [-GitHubUserName] <String> [[-Repository] <String>] [[-PathInRepo] <String>] [[-Destination]

<String>] [[-FilesToRetrive] <String>] [<CommonParameters>]





DESCRIPTION

This command will copy files from a GitHub Repo and store them in a

folder of your choice.





PARAMETERS

-GitHubUserName <String>

This is the GitHub user site that will be used to copy the files from



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Repository <String>

This is the users repository that willl be used to copy the files from, if this

is not specified a menu will show asking to choose the repo from a list.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PathInRepo <String>

If the repo has sub directories you can specify the one you want



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Destination <String>

This is the path that will be used to save the files on the local machine



Required? false

Position? 4

Default value "$env:TEMP\\Git\\$GitHubUserName"

Accept pipeline input? false

Accept wildcard characters? false



-FilesToRetrive <String>

This a RegEx pattern that will dictate which of the files to retrieve



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





General notes

Written By: Brent Denny

Written on: 28 Aug 2019



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-FilesFromRepo -GitHubUserName BOB -Repository Webproject -Destination c:\\RepoCopy



This gets the files in the webproject repo from the GitHub user BOB and copies them

to the the c:\\RepoCopy folder.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-FilesFromRepo -GitHubUserName BOB -Destination c:\\RepoCopy



This will present the user with a menu of Repositories for the GitHub user BOB and

once a repo is selected it will copy file in the repo to the the c:\\RepoCopy folder.











RELATED LINKS