Skip to content

Instantly share code, notes, and snippets.

@0V
Last active April 29, 2017 04:40
Show Gist options
  • Save 0V/031ee0c218415c57372312379d75bc7e to your computer and use it in GitHub Desktop.
Save 0V/031ee0c218415c57372312379d75bc7e to your computer and use it in GitHub Desktop.
for Moving Projects
COPY AND PASTE on CMD
for /D /R %d in (packages) do rmdir /S /Q "%d" &
for /D /R %d in (package) do rmdir /S /Q "%d" &
for /D /R %d in (.git) do rmdir /S /Q "%d" &
for /D /R %d in (Debug) do rmdir /S /Q "%d" &
for /D /R %d in (debug) do rmdir /S /Q "%d" &
for /D /R %d in (DebugPublic) do rmdir /S /Q "%d" &
for /D /R %d in (debugPublic) do rmdir /S /Q "%d" &
for /D /R %d in (Release) do rmdir /S /Q "%d" &
for /D /R %d in (release) do rmdir /S /Q "%d" &
for /D /R %d in (Releases) do rmdir /S /Q "%d" &
for /D /R %d in (releases) do rmdir /S /Q "%d" &
for /D /R %d in (x64) do rmdir /S /Q "%d" &
for /D /R %d in (x86) do rmdir /S /Q "%d" &
for /D /R %d in (build) do rmdir /S /Q "%d" &
for /D /R %d in (bld) do rmdir /S /Q "%d" &
for /D /R %d in (Bin) do rmdir /S /Q "%d" &
for /D /R %d in (bin) do rmdir /S /Q "%d" &
for /D /R %d in (Obj) do rmdir /S /Q "%d" &
for /D /R %d in (obj) do rmdir /S /Q "%d" &
for /D /R %d in (.vs) do rmdir /S /Q "%d" &
del *.suo
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
C:\Users\g2\Documents\Visual Studio 2015\Projects
packages
package
.git
Debug
debug
DebugPublic
debugPublic
Release
release
Releases
releases
x64
x86
build
bld
Bin
bin
Obj
obj
:SETDelayedExpansionEnable
SETLOCAL enabledelayedexpansion
:SetArrayIndex
SET Array_Index=0
:SetCSVFile
SET CSV_file=remove_list.csv
SET PATH_ROOT = "TODO"
:SetArray
FOR /F %%I IN (%CSV_file%) DO (
SET /a Array_Index=!Array_Index!+1
SET Array[!Array_Index!]=%%I
)
:EchoArray
FOR /L %%L IN (1,1,%Array_Index%) DO (For /D /R %d in (%PATH_ROOT%+%%L) do rmdir /S /Q "%d")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment