Search found 227 matches

by taripo
23 Aug 2022 11:50
Forum: DOS Batch Forum
Topic: How do you avoid cmd /c giving a broken error message when a file doesn't exist?
Replies: 7
Views: 3289

Re: How do you avoid cmd /c giving a broken error message when a file doesn't exist?

Fun fact: In the German help text you will not even find someting like "old behavior". For that reason I really don't know what the English help message is talking about. Also, there is no hint that option /S means something like "new behavior". Not even in the English message. It will likely chang...
by taripo
23 Aug 2022 05:03
Forum: DOS Batch Forum
Topic: How do you avoid cmd /c giving a broken error message when a file doesn't exist?
Replies: 7
Views: 3289

Re: How do you avoid cmd /c giving a broken error message when a file doesn't exist?

Admittedly I never got the point of option /s. Wondering if we already have a thread about that somewhere. The point of /S is if you want the "old behaviour" (cmd /? mentions "old behavior"). So it forces old behaviour. or to put it another way, it forcibly skips the "new behaviour". So for example...
by taripo
22 Aug 2022 19:19
Forum: DOS Batch Forum
Topic: What "old style" is cmd /? on cmd /c talking about?!
Replies: 1
Views: 1919

What "old style" is cmd /? on cmd /c talking about?!

So cmd /? mentions 1. If all of the following conditions are met, then quote characters on the command line are preserved: - no /S switch - exactly two quote characters - no special characters between the two quote characters, where special is one of: &<>()@^| - there are one or more whitespace char...
by taripo
22 Aug 2022 17:53
Forum: DOS Batch Forum
Topic: How do you avoid cmd /c giving a broken error message when a file doesn't exist?
Replies: 7
Views: 3289

Re: How do you avoid cmd /c giving a broken error message when a file doesn't exist?

ok thanks.. so cmd /? shows 1. If all of the following conditions are met, then quote characters on the command line are preserved: - no /S switch - exactly two quote characters - no special characters between the two quote characters, where special is one of: &<>()@^| - there are one or more whites...
by taripo
21 Aug 2022 19:22
Forum: DOS Batch Forum
Topic: How do you avoid cmd /c giving a broken error message when a file doesn't exist?
Replies: 7
Views: 3289

How do you avoid cmd /c giving a broken error message when a file doesn't exist?

This, in CMD just running an executable, works C:\blah>"C:\Program Files\Windows NT\Accessories\zordpad.exe" '"C:\Program Files\Windows NT\Accessories\zordpad.exe"' is not recognized as an internal or external command, operable program or batch file. Here, cmd /c gives a broken error message when a ...
by taripo
13 Aug 2022 17:17
Forum: DOS Batch Forum
Topic: how do you explain this with escaping quotes in cmd
Replies: 4
Views: 2380

Re: how do you explain this with escaping quotes in cmd

ok thanks so How would you explain this C:\Users\User>echo ab^"c | find """ FIND: Parameter format not correct C:\Users\User>echo ab^"c | find """" ab"c C:\Users\User>where grep c:\cygwin\bin\grep.exe C:\Users\User>echo ab^"c | grep """ ab"c C:\Users\User>echo ab^"c | grep """" ab"c C:\Users\User>
by taripo
13 Aug 2022 15:19
Forum: DOS Batch Forum
Topic: how do you explain this with escaping quotes in cmd
Replies: 4
Views: 2380

how do you explain this with escaping quotes in cmd

I would have thought that of these quotes C:\>echo "zzz^"abc^"" "zzz^"abc"" C:\> echo "zzz^"abc^"" quotes 1,2,3,4 1- the quote before the zzz 2- between the zzz and the abc there is a ^" So the quote there. 3- after the abc there is ^" , the quote there. 4- There is a quote at the end The first one ...
by taripo
02 Jan 2021 06:40
Forum: DOS Batch Forum
Topic: how can one explain this problem of from the command line, getting wordpad to open a text file?
Replies: 5
Views: 4657

Re: how can one explain this problem of from the command line, getting wordpad to open a text file?

Thanks.. I see that C:\carp>.\wordpad.exe <ENTER> gives that error. whereas this works C:\Program Files\Windows NT\Accessories>.\wordpad<ENTER> So that might rule out PATH and whether a filename is passed as a parameter, which helps in figuring this out. As for your theory re DLLS.. and possibly.. o...
by taripo
02 Jan 2021 04:48
Forum: DOS Batch Forum
Topic: how can one explain this problem of from the command line, getting wordpad to open a text file?
Replies: 5
Views: 4657

Re: how can one explain this problem of from the command line, getting wordpad to open a text file?

Why do you expect WordPad.exe is running if you copy it to the current directory? It won't! And since searching is performed in the current directory before searching in the PATH directories, you'll always get this message... Look at what I showed you there. It did. And i'd expect it to When that w...
by taripo
02 Jan 2021 04:25
Forum: DOS Batch Forum
Topic: how can one explain this problem of from the command line, getting wordpad to open a text file?
Replies: 5
Views: 4657

how can one explain this problem of from the command line, getting wordpad to open a text file?

how can one explain this problem of from the command line, getting wordpad to open a text file? Note that it works in one case but not another case, as I indicate. Windows 7, administrative command prompt. C:\>dir c:\carp\a.txt Volume in drive C has no label. Volume Serial Number is 4645-5DCE Direct...
by taripo
30 Jan 2020 03:36
Forum: DOS Batch Forum
Topic: why doesn't this setting and displaying environment variable work?
Replies: 2
Views: 5093

why doesn't this setting and displaying environment variable work?

been a while since I used batch files, I tend to use them very rarely and don't tend to remember some of the idiosyncracies and I try some tests to figure them out but this simple one has me stuck. why doesn't this setting and displaying environment variable work? C:\blah>type testenvv.bat set %%ppp...
by taripo
11 Apr 2019 12:40
Forum: DOS Batch Forum
Topic: how do I rename *.3gp.mp4 to *.mp4?
Replies: 1
Views: 2757

how do I rename *.3gp.mp4 to *.mp4?

how do I rename *.3gp.mp4 to *.mp4?

so e.g. aaa.3gp.mp4 should be aaa.mp4

E:\blah>rename *.3gp.mp4 *.mp4

E:\blah>move *.3gp.mp4 *.mp4
The filename, directory name, or volume label syntax is incorrect.

E:\blah>

none of those commands are renaming the files.
by taripo
24 May 2018 16:47
Forum: DOS Batch Forum
Topic: difficult starting cmd prompt with execution of two commands
Replies: 4
Views: 5235

Re: difficult starting cmd prompt with execution of two commands

@sst, thanks, you're spot on, I hadn't realised that the round brackets / parentheses , when occurring in a parameter, don't group things! (is that right?) You solved it though. I like both those solutions, the quotes one, and the escaping the ampersand one. you explained that very well with how the...
by taripo
20 May 2018 07:21
Forum: DOS Batch Forum
Topic: difficult starting cmd prompt with execution of two commands
Replies: 4
Views: 5235

difficult starting cmd prompt with execution of two commands

I am having difficulty starting cmd prompt with execution of two commands this works fine (though is just for one command) C:\>start cmd /k echo abc but this, with two commands, fails.. it closes immediately. C:\>start cmd /k (echo abc & echo def) I tried adding a pause to get a better grasp of what...