Search found 217 matches

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: 2928

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: 1190

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: 2232

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: 2232

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...
by taripo
29 Dec 2017 00:16
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 3598

Re: Why use > at beginning of command line

I suppose those are some reason to do it but when considering readability it's worth considering how convention can make things easier to recognise/read. I think there are many reasons why putting it afterwards is clearer.. A)The convention most people use is putting it afterwards.. the first time I...
by taripo
28 Dec 2017 23:45
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 5964

Re: weird error from gnuwin32 head, seems pipe related

I am very sorry to hear that.

His technical posts were of great benefit.

He will be missed.
by taripo
27 Dec 2017 21:04
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 5964

Re: weird error from gnuwin32 head, seems pipe related

I don't think he understood you penpen. His reply would have been more descriptive about his problem. Hmm not sure why I didn't get notified of the reply to this thread at the time, but was just checking back on this topic now to refresh my memory on penpen's findstr workaround, and saw that there ...
by taripo
14 Dec 2017 16:58
Forum: DOS Batch Forum
Topic: quickly write a large file?
Replies: 2
Views: 1468

Re: quickly write a large file?

thanks
by taripo
12 Dec 2017 03:07
Forum: DOS Batch Forum
Topic: quickly write a large file?
Replies: 2
Views: 1468

quickly write a large file?

Hi How can I quickly write a large file where each line has the string "aaa"? this method is slow I let it run for about 20 seconds and stopped it 'cos it was slow and it wrote maybe 20,000 lines far from 200,000 C:\blah>for /L %f in (1,1,200000) do @echo aaa >>abigfile1.txt I could write a program ...
by taripo
21 Mar 2017 15:17
Forum: DOS Batch Forum
Topic: can anybody demonstrate the pipe creates new instance of cmd, issue?
Replies: 5
Views: 3307

Re: can anybody demonstrate the pipe creates new instance of cmd, issue?

it seems to create two command processes pause>nul|set /p=sdf seems to be creating two cmd processes So if I open a cmd.exe window, I have one showing in task manager then I run that and I get 3 running. So it created two. why? I notice that pause or pause>nul, doesn't create a cmd process. So it se...
by taripo
21 Mar 2017 10:49
Forum: DOS Batch Forum
Topic: can anybody demonstrate the pipe creates new instance of cmd, issue?
Replies: 5
Views: 3307

can anybody demonstrate the pipe creates new instance of cmd, issue?

I've often heard that pipes create a new instance of cmd..

I don't see it though

If I go to e.g. the windows directory and I do dir /p | more, then I don't see a new cmd.exe instance appear in task manager.

i'm also interested in when that has ramifications that some might not foresee.

thanks
by taripo
18 Oct 2016 03:20
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 5964

Re: weird error from gnuwin32 head, seems pipe related

Thanks, that was very informative.

In what programming language(s) have you had the experience of creating pipe objects?

Was the environment *nix or windows, and were there big differences?
by taripo
16 Oct 2016 16:46
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 5964

Re: weird error from gnuwin32 head, seems pipe related

thanks.. (I think I figured out exactly what's going on but mid post.. though i'm still not 100% if my conclusions are totally correct) i'm trying to figure out what's going on with this command you have that works.. Z:\>type testfile | grep "." | (head -n 1 & findstr /v "^")...