Code: Select all
systeminfo | findstr /B /C:"OS Name:" >>"%~dpn0.txt"
systeminfo | findstr /B /C:"OS Version:" >>"%~dpn0.txt"
Code: Select all
systeminfo | findstr /B /C:"OS Name:" >>"%~dpn0.txt"
systeminfo | findstr /B /C:"OS Version:" >>"%~dpn0.txt"
Code: Select all
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
%0 returns the entirety of what was typed when the script was called. Presumably they're looking for %~n0.miskox wrote: ↑05 Dec 2022 04:53%0 returns batch name.
SasoCode: Select all
@echo %0
P.S. Use code tags, please.
Code: Select all
copy "C:\Users\Joe\AppData\Local\Google\Chrome\User Data\Default\bookmarks" C:\Data\Chrome