8
4
Is there any way to quickly remove many symbolic links in many folders that contains many other files? E.g some command in command prompt (be able to delete all slink created from day XX for example)?
Remove all objects that are symbolic link, all other objects remain. Now I only navigate folder by folder, manually selecting them in Windows Explorer (rearrange all items by size, and symbolic links size 0KB, and shift key select all --> del) and remove slowly, maybe sometime mistake sl with another 0KB files. My younger bro drag & drop a lot of files with right click (Link Shell Extension Copyright (C) 1999 - 2008 by Hermann Schinagl already installed in PC, integrated into Windows Explorer) and he pick drop as symbolic link, it all became garbage.
I tried FOR /F "usebackq delims=" %%a IN (
DIR /a:l /s /b "D:\"
) DO RMDIR "%%a". I get %%a was unexpected at this time. – Syaiful Nizam Yahya – 2017-01-02T16:40:00.103When typed directly into the command line, substitute
%%a
with%a
.%%a
is for use in a batch file, as it says in the output offor /?
. I'll update my answer to include this info. – dansmith65 – 2017-01-03T17:56:49.467Note this only works for folder symlinks. For file symlinks change rmdir to del – user5389726598465 – 2019-09-11T08:37:06.080