Search found 5 matches

by yky
07 Dec 2021 18:51
Forum: DOS Batch Forum
Topic: add parentheses and batch gives error
Replies: 3
Views: 2701

Re: add parentheses and batch gives error

Thanks a lot! it works like a charm. Anyway to mark the topic as answered? I can't find a way to do that. Also, I notice that some topics are preceded by a red file icon and there are different bell icons. Where can I find the meaning of them? Sorry for asking these basic questions. I'm quite new to...
by yky
07 Dec 2021 00:24
Forum: DOS Batch Forum
Topic: add parentheses and batch gives error
Replies: 3
Views: 2701

add parentheses and batch gives error

I have the following batch file to extract and check the last character of strings in a file: @for /f "tokens=1 delims=;" %%A in ( C:\test.txt) do set d=%%A @echo %d% @echo %d:~-1% @set c=%d:~-1% @echo %c% @if %c%==m @echo found it It works as I hoped but only for the last line in the file test.txt....
by yky
16 Sep 2014 00:42
Forum: DOS Batch Forum
Topic: list files with full path and size
Replies: 6
Views: 10989

Re: list files with full path and size

I posted the following reply few days back but it is gone. Not sure what happened.

I found that the following command would do what I want:

forfiles /s /M *.exe /c "cmd /c echo @path @fsize"
by yky
14 Sep 2014 04:47
Forum: DOS Batch Forum
Topic: list files with full path and size
Replies: 6
Views: 10989

Re: list files with full path and size

Thanks to everyone who replied to my question.

I found that the following command does what I want:

forfiles /s /M *.exe /c "cmd /c echo @path @fsize"

This command lists .exe files with their full path and size. From there I can filter off those whose size is not 46620.
by yky
08 Sep 2014 18:13
Forum: DOS Batch Forum
Topic: list files with full path and size
Replies: 6
Views: 10989

list files with full path and size

How do I list files with the full path and size? "Dir /s /b" lists files with full path but no file size. My computer is full of peculiar executable files. For every folder, there is a corresponding executable with the same name. For example, there are executables named "Program Files...