Skip to content

Instantly share code, notes, and snippets.

@hazzik
Created January 21, 2012 19:11
Show Gist options
  • Save hazzik/1653629 to your computer and use it in GitHub Desktop.
Save hazzik/1653629 to your computer and use it in GitHub Desktop.
Convert tabs to spaces and vice-versa for all *.cs files inside directory
FOR /R . %%G IN (*.cs) DO (
"C:\Program Files\GnuWin32\bin\expand" --tabs=4 --initial "%%G">"%%G.1"
del "%%G"
move "%%G.1" "%%G" )
FOR /R . %%G IN (*.cs) DO (
"C:\Program Files\GnuWin32\bin\unexpand" --tabs=4 --first-only "%%G">"%%G.1"
del "%%G"
move "%%G.1" "%%G" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment