I was testing a file management program today and while looking to solve something else my program ended up not checking for moving a directory to the same directory.
The result is a possibly endless recursion of dir1s. I need to commit the changes so I'm desperate to get these out of my repository.
Any ideas?
Basically.. what I got is:
dir/dir/dir/dir........./dir/dir/dir It's probably on the thousands.
Are you just trying to delete the directory and all subdirectories? RMDIR /S /Q [dirname]
from a command prompt should do the trick.
Update Try this as a workaround:
At the top level of the problem directory, create another directory called 'dummy_dir'
Run robocopy dummy_dir problem_dir /purge
Install Git Bash or some other form of linux shell emulator. Works perfectly without any hassle.
rm -rf /c/offending/dir
Thanks to Meghraj Choudhary for the script to delete the files on windows. https://github.com/dev-mraj/fdel
He claims it shortens the path and thus help to delete them Helpful for node developers
npm install fdel -g
fdel ./node_modules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With