Skip to content

Instantly share code, notes, and snippets.

<#
Ok - so there's multiple ways to skin this cat.
(1) BAT File that calls this GIST into cache and runs it - just save the following as a .BAT:
@ECHO OFF
powershell.exe /executionpolicy bypass /command "(New-Object Net.WebClient).DownloadString('http://bit.ly/renFiles') | Invoke-Expression"
(2) BAT File + PS1 File...the PS1 is saved in the same folder as the BAT, BAT calls the PS1, PS1 can be edited whenever you need to adjust the FolderPath.
- Copy the stuff starting with 'Function...' to the end. Save it somewhere as 'Rename-Files.ps1'
Function Set-ScreenResolution {
<#
.Synopsis
Sets the Screen Resolution of the primary monitor
.Description
Uses Pinvoke and ChangeDisplaySettings Win32API to make the change
.Example
Set-ScreenResolution -Width 1024 -Height 768
#>