Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Last active February 14, 2022 10:41
Show Gist options
  • Save remlapmot/b0a9d64c4c9992de24d3a3bcabe2bd97 to your computer and use it in GitHub Desktop.
Save remlapmot/b0a9d64c4c9992de24d3a3bcabe2bd97 to your computer and use it in GitHub Desktop.
Batch file adding file extensions to use the text previewer (in Windows Explorer and Outlook)
rem Windows batch file adding file extensions to use the text previewer in Windows Explorer and Outlook (and other programs)
for %%x in (
.do
.ado
.log
.smcl
.rmd
.md
.markdown
.bib
.bst
.tex
.aux
.sty
.bbl
.bibtex
.blg
.r
.rproj
.c
.cpp
.config
.dockerfile
.yaml
.yml
.gitattributes
.gitconfig
.gitignore
.rbuildignore
.json
.mdown
.mdtext
.rhistory
.rnw
.rprofile
.renviron
.stmd
.sh
.bat
.jl
.js
.ts
.php
.
.css
.cmd
.inf
.vb
.sql
.ini
.julia_history
.python_history
.condarc
.bash_history
.emacs
.win
.ahk
.snippets
.au3
.ris
.bcf
.vrb
.bibtex
.sas
.sps
.m
.mpl
.snippets
.toc
.pkg
.sthlp
.fls
.fdb_latexmk
.nav
.out
.snm
.rout
.editorconfig
.rst
.ps1
.code-workspace
.xlaunch
.conf
.pa
.wslconfig
) do (
reg add HKEY_CURRENT_USER\SOFTWARE\Classes\%%x /f /v PerceivedType /t REG_SZ /d text
reg query HKEY_CURRENT_USER\SOFTWARE\Classes\%%x /s
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment