Skip to content

Instantly share code, notes, and snippets.

View onyx-nxt's full-sized avatar
💭
Probably Coding something... What else?

Onyx onyx-nxt

💭
Probably Coding something... What else?
View GitHub Profile
@onyx-nxt
onyx-nxt / ConvertAndroidScreenshotToWinScreenshotFormat.ps1
Created October 4, 2025 03:11
Converts Android's screenshot filename format (Screenshot_YYYYMMDD_HHMMSS_AppName) to match the Windows Snipping Tool format (Screenshot YYYY-MM-DD HHMMSS) while preserving file timestamps.
$folderPath = "C:\Path\To\Directory"
# Process matching screenshot files
Get-ChildItem -Path $folderPath -Filter "Screenshot_*.png" | ForEach-Object {
$fileName = $_.BaseName
# Match Screenshot_YYYYMMDD_HHMMSS and extract timestamp
if ($fileName -match '^Screenshot_(\d{8})_(\d{6})') {
$date = $matches[1]
$time = $matches[2]
@onyx-nxt
onyx-nxt / getAllDllFilesInDirectoryAndThenReturnAllOfTheirPathsUsingForwardSlashesAndDirectoriesTwoLevelsUpAreReplacedByAPeriodInOneStringByJoiningThemTogetherByAnAsterisk.ps1
Created July 22, 2023 02:16
Get all dll files in a directory and then return all of their paths using forward slashes and directories two levels up are replaced by a period in one string by joining them together by an asterisk
# Get all DLL files in the specified directory and its subdirectories
$directory = "C:\your\directory\path"
$dllFiles = Get-ChildItem -Path $directory -Filter "*.dll" -File -Recurse
# Convert the paths to forward slashes and replace directories two levels up with a period
$paths = $dllFiles | ForEach-Object {
$relativePath = $_.FullName -replace '^(.*)\\(\w+)\\(\w+)\\(.+)$', '.\$3\$4'
$relativePath = $relativePath -replace "\\","/"
$relativePath
}