M
M
Michael Compass2021-07-17 23:10:00
cmd/bat
Michael Compass, 2021-07-17 23:10:00

My code removes 1kb files instead of 100 bytes. Why?

This cmd code deletes all files in the folder that are 1kb or less in size. With this, everything is in order.

But how to make sure that all files of 100 bytes and less are deleted ?

The code

@for /f %%i in ('set /a 1^^^<^^^<10') do @for %%j in ("{{папка с txt файлами}}\*.txt") do @if %%~zj leq %%i del "%%j"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question