Search found 42 matches

by MicrosoftIsKillingMe
04 Feb 2018 01:20
Forum: DOS Batch Forum
Topic: DIR output including path on the same line as file name?
Replies: 9
Views: 3053

Re: DIR output including path on the same line as file name?

In response to the last post, --------------------------------------------------------------------------------------------------------------------------------------------- The basis of my question about command extensions, which I thought was based on enableextensions: {FOR /?} ... If Command Extens...
by MicrosoftIsKillingMe
03 Feb 2018 16:28
Forum: DOS Batch Forum
Topic: DIR output including path on the same line as file name?
Replies: 9
Views: 3053

Re: DIR output including path on the same line as file name?

Also, per FOR /?, wasn't I supposed to go
setlocal enableextensions
first, in order to use /R ? (It seems to make no difference if I include it)

FWIW I'm running on Win 7. VER is
Microsoft Windows [Version 6.1.7601]

Is enableextensions automatic for some DOS versions?
by MicrosoftIsKillingMe
03 Feb 2018 16:05
Forum: DOS Batch Forum
Topic: DIR output including path on the same line as file name?
Replies: 9
Views: 3053

Re: DIR output including path on the same line as file name?

test.bat for /R c:\ %%I in ("ipconfig.txt*") do @echo %%~tI ... %%~zI ... %%~fI Note the asterisk. This gives (run from c:\, but I assume the /R parm makes that a moot point) the correct 2 files 01/20/2018 09:59 PM ... 8424 ... c:\ipconfig.txt 01/20/2018 09:59 PM ... 8424 ... c:\foo\ipconfig.txt Tha...
by MicrosoftIsKillingMe
03 Feb 2018 12:59
Forum: DOS Batch Forum
Topic: DIR output including path on the same line as file name?
Replies: 9
Views: 3053

DIR output including path on the same line as file name?

I want a compact DIR output that has path, name, size and date on the same line, like "Details" view of F3 search results in Windows. DIR /S FOO.TXT | FINDSTR /C:":" achieves the compact wish, one line per filename, but of course size and path are missing because they're not on the same line in stan...
by MicrosoftIsKillingMe
26 Jan 2018 01:24
Forum: DOS Batch Forum
Topic: Pause to give thanks
Replies: 0
Views: 8917

Pause to give thanks

Forgive me for interrupting the festivities, but this site is amazing and I just have to say it. Its latest gift to me is one of the finest I've found yet: DOS - String Manipulation https://www.dostips.com/DtTipsStringManipulation.php Like many other pages here it is truly a work of art. I wish whoe...
by MicrosoftIsKillingMe
01 Jan 2018 08:10
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 2996

Re: Why use > at beginning of command line

Just to illustrate the other option for trailing space elimination with parentheses, echo 1 > bad.txt (echo 1) > good.txt It is already obvious to some of you, but note that the following do not produce the same result > one.txt (echo 1) > two.txt echo 1 as the second of this pair redirects the extr...
by MicrosoftIsKillingMe
27 Dec 2017 10:18
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 2996

Re: Why use > at beginning of command line

elzooilogico, those are things that I had not even considered, so your post is helpful to me - on each point - so thank you for the additional explanations.
by MicrosoftIsKillingMe
26 Dec 2017 14:21
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 2996

Re: Why use > at beginning of command line

Sorry - I only avoided them because I incorrectly thought that the code tags would eat whitespace, instead of the other way around. (I think some types of code tags on programming forums do that, anyway.) No excuse though - all I had to do was try it with Preview. Thanks for the fix. (Actually, the ...
by MicrosoftIsKillingMe
26 Dec 2017 13:59
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 2996

Re: Why use > at beginning of command line

Thank you. That makes sense and your explanation is very logical to follow, and contains information I did not know. For readability I sometimes use whitespace to align commands, like (if this shows up the same for you as it does for me on the forum post) echo 1 > foo echo 12345678 >> foo but as you...
by MicrosoftIsKillingMe
26 Dec 2017 12:12
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 2996

Why use > at beginning of command line

@aGerman does that here. That's the first time I've seen it in that sequence, and I can't find it documented. I suppose I am wondering what is the difference between echo > a.txt which is how I always thought redirection was done, and > a.txt echo which seems to yield similar or identical results in...
by MicrosoftIsKillingMe
23 Dec 2017 11:39
Forum: DOS Batch Forum
Topic: How show environment var !content! (delayed expansion) inside a FOR loop?
Replies: 4
Views: 1819

Re: How show environment var !content! (delayed expansion) inside a FOR loop?

Okay, and thank you for confirming that I wasn't just badly misunderstanding the sequence or missing something painfully obvious. Although I've only begun using delayed expansion for a couple of days I've spent something like 8 hours intensely googling and tearing into experiments with it - but it s...
by MicrosoftIsKillingMe
23 Dec 2017 00:15
Forum: DOS Batch Forum
Topic: How show environment var !content! (delayed expansion) inside a FOR loop?
Replies: 4
Views: 1819

Re: How show environment var !content! (delayed expansion) inside a FOR loop?

My interpretation here is that the second "group" display (of the 6 lines in a parenthetical block) in the output, is that they are echoing what is "about do be" done "as a group" rather than echoing what actually happening post-expansion. That is, that the assignment and expansion of environment va...
by MicrosoftIsKillingMe
22 Dec 2017 23:25
Forum: DOS Batch Forum
Topic: How show environment var !content! (delayed expansion) inside a FOR loop?
Replies: 4
Views: 1819

How show environment var !content! (delayed expansion) inside a FOR loop?

For the code shown below I want to normally have echo off, but turn echo on to test and debug, and not have to modify individual lines for that - just make that one change to ECHO, and run. In particular I want to see the current (delayed expansion) value of !state! when echo is on, else display not...
by MicrosoftIsKillingMe
22 Dec 2017 14:04
Forum: DOS Batch Forum
Topic: How to measure total and free environment space? (XP SP3)
Replies: 5
Views: 1839

Re: How to measure total and free environment space? (XP SP3)

Pretty elaborate stuff there! I need to try your File Manager. I'm hanging on to Elftree on the XP (which is incredible but only with 8+3); I haven't figure what to use for 7/8/10 - explorer and folder windows are so ridiculously lame. "Folder size" 3rd party tool looks interesting.