batch_delete_loop.py 205 B

123456789
  1. import os
  2. start = int(input("Start from: "))
  3. end = int(input("End at: "))
  4. for i in range(start, end+1):
  5. print("Deleting: " + str(i))
  6. os.system("sudo losetup -d /dev/loop" + str(i))
  7. print("Done!")