Yes, so I think its better to use >nul rather than 2>nul which just hides the error, but I'm still puzzled why the error in the first place - where did the pipe go?
Perhaps it is just because Title does not accept piped input.
Search found 183 matches
- 2024-May-31, 8:12 am
- Forum: Windows CMD Shell
- Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
- Replies: 6
- Views: 622
- 2024-May-30, 4:56 pm
- Forum: Windows CMD Shell
- Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
- Replies: 6
- Views: 622
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Interesting, just piping pause to title throws the error "The process tried to write to a nonexistent pipe"
but if you redirect stdout to Nul, there is no error:
but if you redirect stdout to Nul, there is no error:
Code: Select all
pause >nul | title
- 2024-May-27, 12:27 am
- Forum: Windows CMD Shell
- Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
- Replies: 6
- Views: 622
Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
While the session is paused, the text "- pause" will be appended to the window TITLE. The only way I can think to prevent that would be setting a TITLE with lots of spaces at the end, up to the maximum length of 243 or 259 characters long. Then the additional "- pause" text will ...
- 2024-May-26, 9:41 pm
- Forum: Windows CMD Shell
- Topic: EchoAnsi
- Replies: 2
- Views: 498
Re: EchoAnsi
Jeb, you are a wizard!
But I think you missed out a % in the last line:
But I think you missed out a % in the last line:
Code: Select all
echo %ESC%[41mHello world%ESC%[m
- 2024-May-17, 12:05 am
- Forum: Windows CMD Shell
- Topic: EchoAnsi
- Replies: 2
- Views: 498
EchoAnsi
Here is an alternate version of the EchoAnsi script available here: https://ss64.com/nt/syntax-ansi.html This version uses 3 nested loops to repeat every valid colour combination The forum swallows Esc characters, so to make this work you will need to replace the 3 escape characters on the second la...
- 2024-Apr-20, 10:32 am
- Forum: Meta: Site Feedback / Forum Q&A
- Topic: Password generator
- Replies: 1
- Views: 1827
Re: Password generator
I'm sure it wouldn't be too hard to save the page and add a couple of Mid$ functions to the JavaScript to do that. There are however some reasons to avoid having fixed place-holders in a password. Firstly, should one of your passwords ever be involved in a data breach, then those dashes could act as...
- 2024-Mar-08, 6:27 pm
- Forum: Windows CMD Shell
- Topic: Get a sorted list of the files in Windows OneDrive.
- Replies: 4
- Views: 1788
Re: Get a sorted list of the files in Windows OneDrive.
You can get to the OneDrive synchronisation folder from the %OneDrive% variable
So
or you can use Robocopy List:
This assumes all the files have been synced.
So
Code: Select all
dir /s %OneDrive%
Code: Select all
robocopy %OneDrive% c:\null /l /njh /njs
- 2024-Feb-26, 8:37 pm
- Forum: Windows CMD Shell
- Topic: Puzzled by Delims
- Replies: 4
- Views: 1827
Re: Puzzled by Delims
^ Ah good point, I edited my post to remove that, thanks
- 2024-Feb-26, 8:17 pm
- Forum: Windows CMD Shell
- Topic: Help with Robocopy script to move *EXTRA files and directories
- Replies: 2
- Views: 1516
Re: Help with Robocopy script to move *EXTRA files and directories
The problem with the approach you are describing is that I don't think it will result in a complete backup. You are focussing on preserving copies of renamed or deleted files but there are lots of other situations when you may need an older copy of a file. e.g. if you edit a file and in the process ...
- 2024-Feb-22, 8:38 pm
- Forum: Windows CMD Shell
- Topic: Puzzled by Delims
- Replies: 4
- Views: 1827
Re: Puzzled by Delims
instead of tokens=*
you need to use tokens=2
Otherwise you will break up the string into 2 parts and the * will just return both of them anyway.
you need to use tokens=2
Otherwise you will break up the string into 2 parts and the * will just return both of them anyway.