Categories:
Email 🠪 Servers 🠪 Testing 🠪 Tips
Hardware 🠪 3D Printing 🠪 Apple 🠪 Batteries 🠪 Drives 🠪 Edgerouter 🠪 Electronics 🠪 Laptop 🠪 Modems 🠪 Phone 🠪 Printers 🠪 Raspberry Pi 🠪 Tablets 🠪 Testing 🠪 Virtualization
hidden 🠪 General
Links 🠪 Interesting 🠪 Media
Network 🠪 Data 🠪 Testing 🠪 VPN
Scripts 🠪 Batch 🠪 Linux 🠪 Powershell
Servers 🠪 Databases 🠪 Misc 🠪 Website
Software 🠪 Other
Utilities 🠪 Backup 🠪 Fix Issues 🠪 Recovery
Video 🠪 Editing
Websites 🠪 HTML 🠪 Testing
Windows 🠪 Adjustments 🠪 Issues 🠪 Remote Desktop 🠪 Security 🠪 Slow 🠪 Software 🠪 Startup
Submit Entry | Airin's Notes
Category: Scripts 🠪 Batch Backup File - Template | November 28, 2023 | @echo off
for /f %%i in ('powershell ^(get-date^).DayOfWeek') do set dow=%%i
echo %dow%
rem The above now has the day like "Tuesday" or "Friday" set as an environment variable
robocopy /mir /r:0 /DCOPY:T /xj c:\ "h:\Backups\Daily\%dow%" |
Category: Scripts 🠪 Batch Convert media file using ffmpeg | November 30, 2023 | Put the following in a batch file. You will need to download ffmpeg and place it in some path.
https://ffmpeg.org/download.html
--------------- Start --------------
@echo off
set ffmpeg="C:\Tools\Utils\ffmpeg-win-2.2.2\ffmpeg.exe"
set infolder=C:\Temp\In-WAV
set outfolder=C:\Temp\Out-MP3
set infiletype=wav
set outfiletype=mp3
echo Starting!
echo Input folder: %infolder%
echo Output folder: %outfolder%
echo Input filetype: %infiletype%
echo Output filetype: %outfiletype%
echo.
cd...<Too long, click to read the rest> |
Category: Scripts 🠪 Batch Cycle Network adapter to make the link light flash | November 30, 2023 | @echo off
set message=Press C to cancel this script.
set delay=10
set interface=Ethernet
set /a count = 0
echo Starting disabling of '%interface%'interface. It will be disabled every %delay% seconds.
:start
set /a count += 1
echo.
echo.
echo Disabling Ethernet... Loop #%count%
netsh interface set interface "%interface%" disabled
CHOICE /C CL /M "%message%" /D L /T %delay% /N
if '%ERRORLEVEL%'=='1' goto done
echo Enabling Ethernet... Loop #%count%
netsh interface set interface "%interface%" en...<Too long, click to read the rest> |
Category: Scripts 🠪 Batch Handbrake Batch File to convert passed folders/files | November 27, 2023 |
@echo off
REM Loop through each argument (dragged item)
:loop
if "%~1"=="" goto end
REM Create a directory for the current item
mkdir "D:\video\temp\%~n1"
FOR /F "tokens=*" %%G IN ('DIR "%~1" /B /S /A:-d') do (
FOR /F "tokens=*" %%H IN ('DIR "%%G" /B /A:-d') do (
"C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" --optimize -o "D:\video\temp\%~n1\%%~nH.mp4" -e nvenc_h265 -q 26 --cfr --aencoder av_aac --verbose=1
)
)
REM Shift arguments to process the next item
...<Too long, click to read the rest> |
Category: Scripts 🠪 Batch Upload file via FTP | December 1, 2023 | Put the FTP command script in a .txt file, then make a shortcut or batch file containing:
ftp.exe -s:C:\Temp\testftp.txt
Below is the script to put in a text file:
---------------------- Start ----------------------
open ftp.server.com
theusername
thepassword
binary
prompt
cd "ftp.server.com"
lcd "C:\Temp\Uploads"
put 1.mp3
bye
--------------------- End -----------------------
|
|