Add files via upload

This commit is contained in:
egieb
2023-12-29 15:23:21 +00:00
committed by GitHub
parent c2549dc60e
commit 2efb3d2a2a
98 changed files with 4292 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
REM Title: Filetype Organizer
REM Author: @beigeworm
REM Description: This script searches the users folder for any files with a specific filetype and copies them to the user folder.
REM Target: Windows 10
REM some setup for dukie script
DEFAULT_DELAY 100
REM open powershell (remove -W Hidden to show the window)
DELAY 1000
GUI r
DELAY 750
STRING powershell -NoP -Ep Bypass -W H -C cd $env:USERPROFILE ;irm https://raw.githubusercontent.com/beigeworm/BadUSB-Files-For-FlipperZero/main/Filetype-Organizer/main.ps1 | iex
ENTER
+11
View File
@@ -0,0 +1,11 @@
<h2 align="center"> Search Folders For Filetypes </h2>
SYNOPSIS
Searches User folder for any files with specific filetype and copies them.
USAGE
1. Run Script.
2. follow instructions in the console.
+64
View File
@@ -0,0 +1,64 @@
$Host.UI.RawUI.BackgroundColor = "Black"
Clear-Host
$width = 88
$height = 30
[Console]::SetWindowSize($width, $height)
$windowTitle = " BeigeTools | Filetype Organizer"
[Console]::Title = $windowTitle
Write-Host "=======================================================================================" -ForegroundColor Green
Write-Host "============================= BeigeTools | Filetype Organizer =================================" -ForegroundColor Green
Write-Host "=======================================================================================`n" -ForegroundColor Green
Write-Host "More info at : https://github.com/beigeworm" -ForegroundColor DarkGray
Write-Host "Starts a GUI window to select a folder, then search for every file with a selected filetype and output to respective named files in the root folder.`n"
# Get the directory of the script
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition
# Prompt user for file extensions
$fileExtensions = Read-Host "Enter file extensions separated by commas (e.g., jpg,mp4,png)"
# Convert the input into an array
$fileExtensionsArray = $fileExtensions -split ','
# Prompt user for folder to search recursively
$folderPath = Read-Host "Enter the folder path to search recursively"
# Prompt user to choose between move or copy
$operation = Read-Host "Enter 'M' to move files, 'C' to copy files"
# Validate the user input for the operation
if ($operation -ne 'M' -and $operation -ne 'C') {
Write-Host "Invalid operation. Please enter 'M' for move or 'C' for copy."
exit
}
# Create output folders in the script directory
foreach ($extension in $fileExtensionsArray) {
$folderName = $extension.Trim()
$folderPathForExtension = Join-Path $scriptDirectory $folderName
New-Item -ItemType Directory -Path $folderPathForExtension -Force
}
# Search for files and move/copy to appropriate folders
foreach ($extension in $fileExtensionsArray) {
$files = Get-ChildItem -Path $folderPath -Recurse -Include "*.$extension"
foreach ($file in $files) {
$destinationFolder = Join-Path $scriptDirectory $extension.Trim()
if ($operation -eq 'M') {
$ind = $file.FullName
Move-Item $file.FullName -Destination $destinationFolder -Force
Write-Host "Moved : $ind"
} elseif ($operation -eq 'C') {
$ind = $file.FullName
Copy-Item $file.FullName -Destination $destinationFolder -Force
Write-Host "Copied : $ind"
}
}
}
Write-Host "Operation Complete." -ForegroundColor Green
pause