Skip to content

Instantly share code, notes, and snippets.

@cocolacre
Last active December 2, 2017 22:15
Show Gist options
  • Save cocolacre/b402967df00692c3599ad6e15798c1ef to your computer and use it in GitHub Desktop.
Save cocolacre/b402967df00692c3599ad6e15798c1ef to your computer and use it in GitHub Desktop.
:: script url (gist) = v.ht/doskeys1
@echo off
::########################################
::BACKUP'N'Log DOSKEYS SUBROUTINE
set r0= %random%%random%
set r1= doskeys_%r0:~2,20%
echo %r1%.txt >> %userprofile%\Documents\cmdLog.txt
echo %time% %date% >> %userprofile%\Documents\cmdLog.txt
echo. >> %userprofile%\Documents\cmdLog.txt
echo. >> "%userprofile%\Documents\DATA\%r1%.txt"
echo ::%time% %date% >> "%userprofile%\Documents\DATA\%r1%.txt"
type %0 >> "%userprofile%\Documents\DATA\%r1%.txt"
::########################################
::########################################
::########################################
::########################################
doskey ed=notepad.exe $*
doskey doskeys=notepad.exe doskeys.bat $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment