rm remove a directory code example Example 1: remove directory and contents rm -R directory Example 2: remove directory command line Rmdir "C:\myfolder"