-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathSEF SCREENSHOTS (FOLDER) V3.bat
44 lines (28 loc) · 1.32 KB
/
SEF SCREENSHOTS (FOLDER) V3.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin
@echo off
title SEF Screenshots folder script V3
rem \SEF (folder)
cd /d "%~dp0"
rem goal file
set "__search=System\*.bmp"
set "__destinationFolder=Screenshots"
rem Powershellscript status
set "__injekt='File written: '+$dst"
echo Script by MaxWiese and Erzesel (2020)
echo Just run it every time you want to have all your screenshots in the "Screenshots" folder in the SEF folder.
echo All screenshots are converted to .png format to make it easier to share the screenshots, for example on Discord.
md "%__destinationFolder%" 2>nul
if not exist "%__search%" goto :notFound
rem Powershellscript convert BMP to PNG -> "Screenshots"
powershell $file=Get-Item '%__search%'; Add-Type -AssemblyName System.Drawing;$file^|ForEach{$DF='%__destinationFolder%';$dst='{0}\{1}-{2}.png' -f $DF,$_.CreationTime.toString('HH_mm_MM/dd/yy_f_'),$_.BaseName;$I = new-object System.Drawing.Bitmap $_.Fullname;$I.Save($dst,[Drawing.Imaging.ImageFormat]::PNG);%__injekt%};
rem Delete original screenshots files (.bmp)
del /q "%__search%"
echo Original screenshots files (.bmp) removed and replaced with .png.
:notFound
if not exist "System" (
echo "%~f0" ...
echo ..."%cd%" ...
) else (
echo Cannot find images in the "%cd%\System" !
)