ForFiles command lets you manage or delete folders, complying with some criteria on Windows 11/10. If you want to use ForFiles command on a shared network folder or a mapped network drive, here is how ...
Hmm I guess your telnet session won't have the drives mapped, because it doesn't load up your profile. You would have to map them yourself (net use z: //server/share ...