QuestionId
stringlengths
3
8
QuestionTitle
stringlengths
15
149
QuestionScore
int64
1
27.2k
QuestionCreatedUtc
stringdate
2008-08-01 18:33:08
2025-06-16 04:59:48
QuestionBodyHtml
stringlengths
40
28.2k
QuestionViewCount
int64
78
16.5M
QuestionOwnerUserId
float64
4
25.2M
QuestionLastActivityUtc
stringdate
2008-09-08 19:26:01
2026-01-24 22:40:25
AcceptedAnswerId
int64
266
79.7M
AnswerScore
int64
2
30.1k
AnswerCreatedUtc
stringdate
2008-08-01 23:40:28
2025-06-16 05:23:39
AnswerOwnerUserId
float64
1
29.5M
AnswerLastActivityUtc
stringdate
2008-08-01 23:40:28
2026-01-23 17:46:09
QuestionLink
stringlengths
31
36
AnswerLink
stringlengths
31
36
AnswerBodyHtml
stringlengths
35
33k
AnswerBodyPreview
stringlengths
35
400
AllTagIdsCsv
stringlengths
2
37
AllTagNamesCsv
stringlengths
2
106
MergedQuestion
stringlengths
74
28.4k
quality_filter
stringclasses
10 values
unique_id
int64
0
29k
tag_major_lang
stringclasses
10 values
MergedQuestion_md
stringlengths
60
28.1k
AnswerBodyHtml_md
stringlengths
14
29.2k
2190944
How to spawn several processes from the Windows shell and wait for them all to complete?
15
2010-02-03 09:35:58
<p>I want to do the following from a Windows batch script:</p> <pre><code>start proc1.exe start proc2.exe ... start procN.exe &lt;wait for all N processes to complete&gt; &lt;-- What do I put here? </code></pre> <p>How do I wait for all spawned processes to complete?</p>
29,767
264,250
2019-03-18 09:26:32
2,192,654
14
2010-02-03 14:36:39
9,702
2010-02-03 14:36:39
https://stackoverflow.com/q/2190944
https://stackoverflow.com/a/2192654
<p>This is ugly, but you could wrap each command in <em>another</em> batch file that runs the command and then signals that the command is complete. Your main batch file would call each of those batch files asynchronously and sit in a loop waiting for the signals.</p> <p>For example:</p> <p><strong>main.bat</strong>...
<p>This is ugly, but you could wrap each command in <em>another</em> batch file that runs the command and then signals that the command is complete. Your main batch file would call each of those batch files asynchronously and sit in a loop waiting for the signals.</p> <p>For example:</p> <p><strong>main.bat</strong>...
64, 531, 7002
batch-file, scripting, windows
<h1>How to spawn several processes from the Windows shell and wait for them all to complete?</h1> <p>I want to do the following from a Windows batch script:</p> <pre><code>start proc1.exe start proc2.exe ... start procN.exe &lt;wait for all N processes to complete&gt; &lt;-- What do I put here? </code></pre> <p>H...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,301
cmd
# How to spawn several processes from the Windows shell and wait for them all to complete? I want to do the following from a Windows batch script: ``` start proc1.exe start proc2.exe ... start procN.exe <wait for all N processes to complete> <-- What do I put here? ``` How do I wait for all spawned processes to ...
This is ugly, but you could wrap each command in *another* batch file that runs the command and then signals that the command is complete. Your main batch file would call each of those batch files asynchronously and sit in a loop waiting for the signals. For example: **main.bat** ``` start cmd /c proc1.bat start cmd...
7027065
How safe is MongoDB's safe mode on inserts?
14
2011-08-11 13:51:21
<p>I am working on a project which has some important data in it. This means we cannot to lose any of it if the light or server goes down. We are using MongoDB for the database. I'd like to be sure that my data is in the database after the insert and rollback the whole batch if one element was not inserted. I know it i...
8,816
855,959
2014-07-08 13:02:28
7,027,188
14
2011-08-11 13:58:51
68,283
2011-08-11 14:13:12
https://stackoverflow.com/q/7027065
https://stackoverflow.com/a/7027188
<p>Your best bet is to use Write Concerns - these allow you to tell MongoDB how important a piece of data is. The quickest Write Concern is also the least safe - the data is not flushed to disk until the next scheduled flush. The safest will confirm that the data has been written to disk on a number of machines before ...
<p>Your best bet is to use Write Concerns - these allow you to tell MongoDB how important a piece of data is. The quickest Write Concern is also the least safe - the data is not flushed to disk until the next scheduled flush. The safest will confirm that the data has been written to disk on a number of machines before ...
7002, 14676, 30073
batch-file, mongodb, safe-mode
<h1>How safe is MongoDB's safe mode on inserts?</h1> <p>I am working on a project which has some important data in it. This means we cannot to lose any of it if the light or server goes down. We are using MongoDB for the database. I'd like to be sure that my data is in the database after the insert and rollback the who...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,302
cmd
# How safe is MongoDB's safe mode on inserts? I am working on a project which has some important data in it. This means we cannot to lose any of it if the light or server goes down. We are using MongoDB for the database. I'd like to be sure that my data is in the database after the insert and rollback the whole batch ...
Your best bet is to use Write Concerns - these allow you to tell MongoDB how important a piece of data is. The quickest Write Concern is also the least safe - the data is not flushed to disk until the next scheduled flush. The safest will confirm that the data has been written to disk on a number of machines before ret...
2772180
cmd.exe: complex conditions?
14
2010-05-05 10:04:45
<p>in DOS batch files, In an <code>IF</code> statement, is it possible to combine two or more conditions using AND or OR ? I was not able to find any documentation for that</p> <p><strong>Edit</strong> - <code>help if</code> and the MS docs say nothing about using more than one condition in an if.</p> <p>I guess a wo...
21,055
9,611
2016-02-16 17:12:23
2,772,280
14
2010-05-05 10:18:12
73,070
2012-10-10 11:26:18
https://stackoverflow.com/q/2772180
https://stackoverflow.com/a/2772280
<p>No, there is no easier way.</p> <p>For <code>and</code> you can also just chain them without introducing blocks:</p> <pre><code>if COND1 if COND2 ... </code></pre> <p>which frankly isn't any worse than</p> <pre><code>if COND1 and COND2 ... </code></pre> <p>However, for <code>or</code> it gets uglier, indeed:</p...
<p>No, there is no easier way.</p> <p>For <code>and</code> you can also just chain them without introducing blocks:</p> <pre><code>if COND1 if COND2 ... </code></pre> <p>which frankly isn't any worse than</p> <pre><code>if COND1 and COND2 ... </code></pre> <p>However, for <code>or</code> it gets uglier, indeed:</p...
64, 7002, 39271
batch-file, conditional-statements, windows
<h1>cmd.exe: complex conditions?</h1> <p>in DOS batch files, In an <code>IF</code> statement, is it possible to combine two or more conditions using AND or OR ? I was not able to find any documentation for that</p> <p><strong>Edit</strong> - <code>help if</code> and the MS docs say nothing about using more than one co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,303
cmd
# cmd.exe: complex conditions? in DOS batch files, In an `IF` statement, is it possible to combine two or more conditions using AND or OR ? I was not able to find any documentation for that **Edit** - `help if` and the MS docs say nothing about using more than one condition in an if. I guess a workaround for AND wou...
No, there is no easier way. For `and` you can also just chain them without introducing blocks: ``` if COND1 if COND2 ... ``` which frankly isn't any worse than ``` if COND1 and COND2 ... ``` However, for `or` it gets uglier, indeed: ``` set COND= if COND1 set COND=1 if COND2 set COND=1 if defined COND ... ``` or...
28221405
Automated httr authentication with twitteR , provide response to interactive prompt in "batch" mode
13
2015-01-29 17:56:57
<p>I am using the R package twitteR to post items to Twitter. I put everything inside of a function and it works fine. However, I would like to run the function without being prompted for a response, and I haven't figured out how to do that. Any suggestions?</p> <p>Here are the bare bones of my function:</p> <pre>...
9,196
2,140,956
2017-01-17 14:50:08
28,332,136
14
2015-02-04 21:49:01
4,474,157
2015-02-04 21:57:10
https://stackoverflow.com/q/28221405
https://stackoverflow.com/a/28332136
<p>You can try setting the <code>httr_oauth_cache</code> option to TRUE:</p> <pre><code>options(httr_oauth_cache=T) </code></pre> <p>The twitteR package uses the <code>httr</code> package, on the <code>Token</code> manual page for that package they give tips about caching:</p> <pre><code>OAuth tokens are cached on d...
<p>You can try setting the <code>httr_oauth_cache</code> option to TRUE:</p> <pre><code>options(httr_oauth_cache=T) </code></pre> <p>The twitteR package uses the <code>httr</code> package, on the <code>Token</code> manual page for that package they give tips about caching:</p> <pre><code>OAuth tokens are cached on d...
4452, 30645, 60910
batch-processing, r, twitter-oauth
<h1>Automated httr authentication with twitteR , provide response to interactive prompt in "batch" mode</h1> <p>I am using the R package twitteR to post items to Twitter. I put everything inside of a function and it works fine. However, I would like to run the function without being prompted for a response, and I hav...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,304
cmd
# Automated httr authentication with twitteR , provide response to interactive prompt in "batch" mode I am using the R package twitteR to post items to Twitter. I put everything inside of a function and it works fine. However, I would like to run the function without being prompted for a response, and I haven't figure...
You can try setting the `httr_oauth_cache` option to TRUE: ``` options(httr_oauth_cache=T) ``` The twitteR package uses the `httr` package, on the `Token` manual page for that package they give tips about caching: ``` OAuth tokens are cached on disk in a file called .httr-oauth saved in the current working director...
11193691
Batch: Escaping with caret
12
2012-06-25 16:52:54
<p>I've always hated batch and I still do, even for the most simple things I prefer C or PHP/Perl. But this time I could not go without it, ****sigh****.</p> <p>I wanted to redirect an echo command to an other command. For example:</p> <pre><code>echo example | more </code></pre> <p>but I also wanted to be able to u...
11,774
1,124,737
2017-07-31 22:20:57
11,194,077
14
2012-06-25 17:17:02
1,012,053
2012-06-25 17:22:23
https://stackoverflow.com/q/11193691
https://stackoverflow.com/a/11194077
<p>The reason has to do with how Windows implements pipes - Each side of the pipe is executed in its own CMD shell. Your command <code>echo ^&amp; | more</code> actually attempts to execute</p> <pre><code>C:\Windows\system32\cmd.exe /S /D /c" echo &amp; " </code></pre> <p>on the left and</p> <pre><code>C:\Windows\sy...
<p>The reason has to do with how Windows implements pipes - Each side of the pipe is executed in its own CMD shell. Your command <code>echo ^&amp; | more</code> actually attempts to execute</p> <pre><code>C:\Windows\system32\cmd.exe /S /D /c" echo &amp; " </code></pre> <p>on the left and</p> <pre><code>C:\Windows\sy...
2631, 7002, 19486
batch-file, cmd, piping
<h1>Batch: Escaping with caret</h1> <p>I've always hated batch and I still do, even for the most simple things I prefer C or PHP/Perl. But this time I could not go without it, ****sigh****.</p> <p>I wanted to redirect an echo command to an other command. For example:</p> <pre><code>echo example | more </code></pre> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,306
cmd
# Batch: Escaping with caret I've always hated batch and I still do, even for the most simple things I prefer C or PHP/Perl. But this time I could not go without it, ****sigh****. I wanted to redirect an echo command to an other command. For example: ``` echo example | more ``` but I also wanted to be able to use s...
The reason has to do with how Windows implements pipes - Each side of the pipe is executed in its own CMD shell. Your command `echo ^& | more` actually attempts to execute ``` C:\Windows\system32\cmd.exe /S /D /c" echo & " ``` on the left and ``` C:\Windows\system32\cmd.exe /S /D /c" more " ``` on the right. You ca...
7461373
Windows batch command to move all folders in a directory with exceptions
12
2011-09-18 12:09:18
<p>I am trying to write a Windows Batch file that will allow me to move all directories within a given source directory into a target directory that exists within that source directory.</p> <p>Obviously my move command with need to only apply to directories and also exclude the target directory from being processed.</...
30,342
874,117
2020-01-07 14:08:21
7,461,492
14
2011-09-18 12:27:37
246,342
2011-09-18 12:33:13
https://stackoverflow.com/q/7461373
https://stackoverflow.com/a/7461492
<p><a href="http://ss64.com/nt/robocopy.html">Robocopy</a> (present in recent versions of windows or downloadable from the <a href="http://www.microsoft.com/download/en/details.aspx?id=17657">WRK</a>) can do this, just use the <code>/xd</code> switch to exclude the target directory from the copy;</p> <pre><code>roboco...
<p><a href="http://ss64.com/nt/robocopy.html">Robocopy</a> (present in recent versions of windows or downloadable from the <a href="http://www.microsoft.com/download/en/details.aspx?id=17657">WRK</a>) can do this, just use the <code>/xd</code> switch to exclude the target directory from the copy;</p> <pre><code>roboco...
64, 218, 5634, 7002
batch-file, directory, move, windows
<h1>Windows batch command to move all folders in a directory with exceptions</h1> <p>I am trying to write a Windows Batch file that will allow me to move all directories within a given source directory into a target directory that exists within that source directory.</p> <p>Obviously my move command with need to only ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,307
cmd
# Windows batch command to move all folders in a directory with exceptions I am trying to write a Windows Batch file that will allow me to move all directories within a given source directory into a target directory that exists within that source directory. Obviously my move command with need to only apply to directo...
[Robocopy](http://ss64.com/nt/robocopy.html) (present in recent versions of windows or downloadable from the [WRK](http://www.microsoft.com/download/en/details.aspx?id=17657)) can do this, just use the `/xd` switch to exclude the target directory from the copy; ``` robocopy c:\source\ c:\source\target\ *.* /E /XD c:\s...
15537427
How to exit the cmd loop of cmd module cleanly
11
2013-03-21 00:37:47
<p>I'm using the <code>cmd</code> module in Python to build a little interactive command-line program. However, from this documentation: <a href="http://docs.python.org/2/library/cmd.html" rel="noreferrer">http://docs.python.org/2/library/cmd.html</a>, it is not clear that what is a clean way to exit the program (i.e. ...
12,172
2,132,511
2021-05-11 18:42:18
15,537,821
14
2013-03-21 01:20:44
2,009,616
2013-03-21 09:48:46
https://stackoverflow.com/q/15537427
https://stackoverflow.com/a/15537821
<p>You need to override the <code>postcmd</code> method:</p> <blockquote> <p>Cmd.postcmd(stop, line)</p> <p>Hook method executed just after a command dispatch is finished. This method is a stub in Cmd; it exists to be overridden by subclasses. line is the command line which was executed, and stop is a flag ...
<p>You need to override the <code>postcmd</code> method:</p> <blockquote> <p>Cmd.postcmd(stop, line)</p> <p>Hook method executed just after a command dispatch is finished. This method is a stub in Cmd; it exists to be overridden by subclasses. line is the command line which was executed, and stop is a flag ...
16, 2631
cmd, python
<h1>How to exit the cmd loop of cmd module cleanly</h1> <p>I'm using the <code>cmd</code> module in Python to build a little interactive command-line program. However, from this documentation: <a href="http://docs.python.org/2/library/cmd.html" rel="noreferrer">http://docs.python.org/2/library/cmd.html</a>, it is not c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,308
cmd
# How to exit the cmd loop of cmd module cleanly I'm using the `cmd` module in Python to build a little interactive command-line program. However, from this documentation: <http://docs.python.org/2/library/cmd.html>, it is not clear that what is a clean way to exit the program (i.e. the cmdloop) programmatically. Ide...
You need to override the `postcmd` method: > Cmd.postcmd(stop, line) > > Hook method executed just after a command dispatch is finished. This > method is a stub in Cmd; it exists to be overridden by subclasses. > line is the command line which was executed, and stop is a flag which > indicates whether execution will b...
12643199
Installing Windows Service with batch file?
11
2012-09-28 15:45:45
<p>I have the following in a bat file : </p> <pre><code>@ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------------------------------------- C:\Windows\Microsoft....
40,118
365,624
2019-01-17 05:47:04
13,304,428
14
2012-11-09 08:16:50
365,624
2012-11-09 08:16:50
https://stackoverflow.com/q/12643199
https://stackoverflow.com/a/13304428
<p>This is how it is solved :</p> <pre><code>@ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------------------------------------- C:\Windows\Microsoft.NET\Framewo...
<p>This is how it is solved :</p> <pre><code>@ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------------------------------------- C:\Windows\Microsoft.NET\Framewo...
2596, 3018, 7002
batch-file, installutil, windows-services
<h1>Installing Windows Service with batch file?</h1> <p>I have the following in a bat file : </p> <pre><code>@ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,309
cmd
# Installing Windows Service with batch file? I have the following in a bat file : ``` @ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo -----------------------------------------...
This is how it is solved : ``` @ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo --------------------------------------------------- C:\Windows\Microsoft.NET\Framework\v4.0.30319\...
11501044
I need execute a command line in a Visual Basic Script
11
2012-07-16 09:01:13
<p>I need to execute the command "ver" in my vbs to see the version of my Operating System, and i don't know how make it.</p> <p>I tried this, but dont work:</p> <pre><code>Function ExecuteWithTerminalOutput(cmd) Set shell = WScript.CreateObject("WScript.Shell") Set Exec = shell.Exec("ver") End Function </code></pr...
81,831
1,528,355
2019-04-16 09:25:51
11,501,073
14
2012-07-16 09:02:59
1,133,011
2012-07-16 10:22:53
https://stackoverflow.com/q/11501044
https://stackoverflow.com/a/11501073
<p>Try something like this:</p> <pre><code>Dim objShell Set objShell = WScript.CreateObject ("WScript.shell") objShell.run "cmd /c ver" Set objShell = Nothing </code></pre> <p>EDIT:</p> <p>Well then you can redirect output to a file and then read the file:</p> <pre><code>return = WshShell.Run("cmd /c ver &gt; c:\te...
<p>Try something like this:</p> <pre><code>Dim objShell Set objShell = WScript.CreateObject ("WScript.shell") objShell.run "cmd /c ver" Set objShell = Nothing </code></pre> <p>EDIT:</p> <p>Well then you can redirect output to a file and then read the file:</p> <pre><code>return = WshShell.Run("cmd /c ver &gt; c:\te...
494, 1231, 2631, 7932
cmd, command-line, exec, vbscript
<h1>I need execute a command line in a Visual Basic Script</h1> <p>I need to execute the command "ver" in my vbs to see the version of my Operating System, and i don't know how make it.</p> <p>I tried this, but dont work:</p> <pre><code>Function ExecuteWithTerminalOutput(cmd) Set shell = WScript.CreateObject("WScrip...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,310
cmd
# I need execute a command line in a Visual Basic Script I need to execute the command "ver" in my vbs to see the version of my Operating System, and i don't know how make it. I tried this, but dont work: ``` Function ExecuteWithTerminalOutput(cmd) Set shell = WScript.CreateObject("WScript.Shell") Set Exec = shell....
Try something like this: ``` Dim objShell Set objShell = WScript.CreateObject ("WScript.shell") objShell.run "cmd /c ver" Set objShell = Nothing ``` EDIT: Well then you can redirect output to a file and then read the file: ``` return = WshShell.Run("cmd /c ver > c:\temp\output.txt", 0, true) Set fso = CreateObjec...
9211819
Check if file is read-only and change in Windows batch file
11
2012-02-09 13:34:42
<p>How would I go about checking if a file is read-only, and if so change it to be not read-only, and also the other way around?</p>
16,969
111,731
2018-12-12 12:23:28
9,211,869
14
2012-02-09 13:38:29
1,199,729
2018-12-12 12:23:28
https://stackoverflow.com/q/9211819
https://stackoverflow.com/a/9211869
<p>I'm no DOS expert but if memory serves me, check the "attrib" command. That should tell you what you need to know, and you can use it to set the attributes as well.</p> <pre><code>attrib -r &lt;filename&gt; make it read/write attrib +r &lt;filename&gt; make it readonly </code></pre>
<p>I'm no DOS expert but if memory serves me, check the "attrib" command. That should tell you what you need to know, and you can use it to set the attributes as well.</p> <pre><code>attrib -r &lt;filename&gt; make it read/write attrib +r &lt;filename&gt; make it readonly </code></pre>
64, 7002
batch-file, windows
<h1>Check if file is read-only and change in Windows batch file</h1> <p>How would I go about checking if a file is read-only, and if so change it to be not read-only, and also the other way around?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,311
cmd
# Check if file is read-only and change in Windows batch file How would I go about checking if a file is read-only, and if so change it to be not read-only, and also the other way around?
I'm no DOS expert but if memory serves me, check the "attrib" command. That should tell you what you need to know, and you can use it to set the attributes as well. ``` attrib -r <filename> make it read/write attrib +r <filename> make it readonly ```
6438570
Integrating Spring Batch Admin into an existing application
11
2011-06-22 10:45:15
<p>I have an application which uses Spring Batch and Spring MVC. I am able to deploy Spring Batch Admin as a separate war and use it against the same DB my application uses, though I would like to integrate it into my own application, possibly modify some of the views as well. </p> <p>Is there an easy way to do this o...
18,807
179,573
2016-04-12 12:50:39
6,466,155
14
2011-06-24 09:50:24
179,573
2011-06-24 09:50:24
https://stackoverflow.com/q/6438570
https://stackoverflow.com/a/6466155
<p>There is an easy way apparently according to this <a href="http://forum.springsource.org/showthread.php?100387-Spring-Batch-Admin-1.2.0.RELEASE-Available&amp;p=351442" rel="noreferrer">thread</a>;</p> <ul> <li><p>Define a DispatcherServlet for Batch Admin in <code>web.xml</code>:</p> <pre><code>&lt;servlet&gt; ...
<p>There is an easy way apparently according to this <a href="http://forum.springsource.org/showthread.php?100387-Spring-Batch-Admin-1.2.0.RELEASE-Available&amp;p=351442" rel="noreferrer">thread</a>;</p> <ul> <li><p>Define a DispatcherServlet for Batch Admin in <code>web.xml</code>:</p> <pre><code>&lt;servlet&gt; ...
1211, 7027, 41895, 70274
spring, spring-batch, spring-batch-admin, spring-mvc
<h1>Integrating Spring Batch Admin into an existing application</h1> <p>I have an application which uses Spring Batch and Spring MVC. I am able to deploy Spring Batch Admin as a separate war and use it against the same DB my application uses, though I would like to integrate it into my own application, possibly modify ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,312
cmd
# Integrating Spring Batch Admin into an existing application I have an application which uses Spring Batch and Spring MVC. I am able to deploy Spring Batch Admin as a separate war and use it against the same DB my application uses, though I would like to integrate it into my own application, possibly modify some of t...
There is an easy way apparently according to this [thread](http://forum.springsource.org/showthread.php?100387-Spring-Batch-Admin-1.2.0.RELEASE-Available&p=351442); - Define a DispatcherServlet for Batch Admin in `web.xml`: ``` <servlet> <servlet-name>Batch Servlet</servlet-name> <servlet-class>org.sp...
62041724
Batchnorm2d Pytorch - Why pass number of channels to batchnorm?
10
2020-05-27 11:12:51
<p>Why do I need to pass the previous nummber of channels to the batchnorm? The batchnorm should normalize over each datapoint in the batch, why does it need to have the number of channels then ?</p>
4,346
13,286,102
2021-06-10 20:31:42
62,042,722
14
2020-05-27 12:04:11
6,447,491
2020-05-27 12:04:11
https://stackoverflow.com/q/62041724
https://stackoverflow.com/a/62042722
<p>Batch normalisation has learnable parameters, because it includes an affine transformation.</p> <p>From the documentation of <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.BatchNorm2d" rel="noreferrer"><code>nn.BatchNorm2d</code></a>:</p> <blockquote> <p><a href="https://i.sstatic.net/Z4OTh.png" rel="...
<p>Batch normalisation has learnable parameters, because it includes an affine transformation.</p> <p>From the documentation of <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.BatchNorm2d" rel="noreferrer"><code>nn.BatchNorm2d</code></a>:</p> <blockquote> <p><a href="https://i.sstatic.net/Z4OTh.png" rel="...
5990, 100570, 124253, 124994, 140421
batchnorm, batch-normalization, deep-learning, machine-learning, pytorch
<h1>Batchnorm2d Pytorch - Why pass number of channels to batchnorm?</h1> <p>Why do I need to pass the previous nummber of channels to the batchnorm? The batchnorm should normalize over each datapoint in the batch, why does it need to have the number of channels then ?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,313
cmd
# Batchnorm2d Pytorch - Why pass number of channels to batchnorm? Why do I need to pass the previous nummber of channels to the batchnorm? The batchnorm should normalize over each datapoint in the batch, why does it need to have the number of channels then ?
Batch normalisation has learnable parameters, because it includes an affine transformation. From the documentation of [`nn.BatchNorm2d`](https://pytorch.org/docs/stable/nn.html#torch.nn.BatchNorm2d): > [![BatchNorm Formular](https://i.sstatic.net/Z4OTh.png)](https://i.sstatic.net/Z4OTh.png) > > The mean and standard-...
45825627
Using Spring Batch to parse date from file into LocalDateTime
10
2017-08-22 19:33:45
<p>I'm trying to read a CSV file with dates with Spring Batch, but I am having trouble parsing a date into a <code>LocalDateTime</code> Object:</p> <blockquote> <p>Field error in object 'target' on field 'date': rejected value [2017-07-20 04:15:25.0]; codes [typeMismatch.target.date,typeMismatch.date,typeMismatch.ja...
13,320
1,461,484
2020-11-23 02:43:16
47,267,321
14
2017-11-13 15:01:37
8,625,821
2019-02-23 08:24:06
https://stackoverflow.com/q/45825627
https://stackoverflow.com/a/47267321
<p>You can override method <code>initBinder</code> of <code>BeanWrapperFieldSetMapper&lt;T&gt;</code>:</p> <pre><code>public class BeanWrapperFieldSetMapperCustom&lt;T&gt; extends BeanWrapperFieldSetMapper&lt;T&gt; { @Override protected void initBinder(DataBinder binder) { DateTimeFormatter formatter ...
<p>You can override method <code>initBinder</code> of <code>BeanWrapperFieldSetMapper&lt;T&gt;</code>:</p> <pre><code>public class BeanWrapperFieldSetMapperCustom&lt;T&gt; extends BeanWrapperFieldSetMapper&lt;T&gt; { @Override protected void initBinder(DataBinder binder) { DateTimeFormatter formatter ...
17, 1211, 41895
java, spring, spring-batch
<h1>Using Spring Batch to parse date from file into LocalDateTime</h1> <p>I'm trying to read a CSV file with dates with Spring Batch, but I am having trouble parsing a date into a <code>LocalDateTime</code> Object:</p> <blockquote> <p>Field error in object 'target' on field 'date': rejected value [2017-07-20 04:15:2...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,314
cmd
# Using Spring Batch to parse date from file into LocalDateTime I'm trying to read a CSV file with dates with Spring Batch, but I am having trouble parsing a date into a `LocalDateTime` Object: > Field error in object 'target' on field 'date': rejected value [2017-07-20 04:15:25.0]; codes [typeMismatch.target.date,ty...
You can override method `initBinder` of `BeanWrapperFieldSetMapper<T>`: ``` public class BeanWrapperFieldSetMapperCustom<T> extends BeanWrapperFieldSetMapper<T> { @Override protected void initBinder(DataBinder binder) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); bin...
37520159
Spring Batch : parallel steps execution in java configuration file
10
2016-05-30 07:41:40
<p>I am trying to make a sample application on parallel step execution in java configuration file but get perplexed that how many files(job repository,job launcher and execution etc.) are being configured and initialized and if configured then how? Simply I need a sample application to clarify the basics of parallel e...
20,122
5,901,797
2018-02-21 14:05:49
37,549,969
14
2016-05-31 15:35:07
618,059
2016-05-31 15:35:07
https://stackoverflow.com/q/37520159
https://stackoverflow.com/a/37549969
<p>Here's an example of using splits via java config. In this example, flows 1 and 2 will be executed in parallel:</p> <pre><code>@Configuration public class BatchConfiguration { @Autowired private JobBuilderFactory jobBuilderFactory; @Autowired private StepBuilderFactory stepBuilderFactory; @B...
<p>Here's an example of using splits via java config. In this example, flows 1 and 2 will be executed in parallel:</p> <pre><code>@Configuration public class BatchConfiguration { @Autowired private JobBuilderFactory jobBuilderFactory; @Autowired private StepBuilderFactory stepBuilderFactory; @B...
41895
spring-batch
<h1>Spring Batch : parallel steps execution in java configuration file</h1> <p>I am trying to make a sample application on parallel step execution in java configuration file but get perplexed that how many files(job repository,job launcher and execution etc.) are being configured and initialized and if configured then ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,316
cmd
# Spring Batch : parallel steps execution in java configuration file I am trying to make a sample application on parallel step execution in java configuration file but get perplexed that how many files(job repository,job launcher and execution etc.) are being configured and initialized and if configured then how? Simp...
Here's an example of using splits via java config. In this example, flows 1 and 2 will be executed in parallel: ``` @Configuration public class BatchConfiguration { @Autowired private JobBuilderFactory jobBuilderFactory; @Autowired private StepBuilderFactory stepBuilderFactory; @Bean public ...
21032288
What does :/= mean in %date:/=%?
10
2014-01-09 22:10:15
<p>While searching for a way to create a date-named directory in Windows, I came accross <a href="https://stackoverflow.com/q/5485853/520162">this question</a> with <a href="https://stackoverflow.com/a/5485929/520162">that</a> accepted answer.</p> <p>There's a comment below the accepted answer:</p> <blockquote> <p>...
4,242
520,162
2015-04-15 09:17:50
21,032,377
14
2014-01-09 22:15:30
2,128,947
2014-01-09 22:22:21
https://stackoverflow.com/q/21032288
https://stackoverflow.com/a/21032377
<p>It means substitute for the string between the <kbd>:</kbd> and the <kbd>=</kbd> with the string after the <kbd>=</kbd> and before the closing <kbd>%</kbd></p> <p>So it strips out any <kbd>/</kbd> from the variable <code>%date%</code> which is set by default to the current date.</p>
<p>It means substitute for the string between the <kbd>:</kbd> and the <kbd>=</kbd> with the string after the <kbd>=</kbd> and before the closing <kbd>%</kbd></p> <p>So it strips out any <kbd>/</kbd> from the variable <code>%date%</code> which is set by default to the current date.</p>
276, 7002
batch-file, variables
<h1>What does :/= mean in %date:/=%?</h1> <p>While searching for a way to create a date-named directory in Windows, I came accross <a href="https://stackoverflow.com/q/5485853/520162">this question</a> with <a href="https://stackoverflow.com/a/5485929/520162">that</a> accepted answer.</p> <p>There's a comment below th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,317
cmd
# What does :/= mean in %date:/=%? While searching for a way to create a date-named directory in Windows, I came accross [this question](https://stackoverflow.com/q/5485853/520162) with [that](https://stackoverflow.com/a/5485929/520162) accepted answer. There's a comment below the accepted answer: > To make it more ...
It means substitute for the string between the `:` and the `=` with the string after the `=` and before the closing `%` So it strips out any `/` from the variable `%date%` which is set by default to the current date.
18978751
how to run node.js app from cmd with some predefined port in Windows
10
2013-09-24 10:13:08
<p>Is it some command exist to run my node.js code with directly specified port? something like <code>node server.js port=7777</code> ?</p> <p>my server.js code looks like this</p> <pre><code>http.createServer(function (req, res) { if (mount(req, res)) return; }).listen(process.env.PORT || 80); </code></pre>
31,300
1,988,021
2022-11-01 07:55:03
18,980,304
14
2013-09-24 11:25:06
1,888,017
2018-11-22 16:51:48
https://stackoverflow.com/q/18978751
https://stackoverflow.com/a/18980304
<p>A simple adding to Alberto's answer. On Windows machine you haven't <code>export</code> command in <code>cmd</code>, use <code>set</code> instead. Then the whole script will be looks like this:</p> <pre><code>set PORT=7777 node server.js </code></pre> <p>Note that the syntax in PowerShell is slightly different:</p...
<p>A simple adding to Alberto's answer. On Windows machine you haven't <code>export</code> command in <code>cmd</code>, use <code>set</code> instead. Then the whole script will be looks like this:</p> <pre><code>set PORT=7777 node server.js </code></pre> <p>Note that the syntax in PowerShell is slightly different:</p...
64, 2631, 46426
cmd, node.js, windows
<h1>how to run node.js app from cmd with some predefined port in Windows</h1> <p>Is it some command exist to run my node.js code with directly specified port? something like <code>node server.js port=7777</code> ?</p> <p>my server.js code looks like this</p> <pre><code>http.createServer(function (req, res) { if (mo...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,318
cmd
# how to run node.js app from cmd with some predefined port in Windows Is it some command exist to run my node.js code with directly specified port? something like `node server.js port=7777` ? my server.js code looks like this ``` http.createServer(function (req, res) { if (mount(req, res)) return; }).listen(proce...
A simple adding to Alberto's answer. On Windows machine you haven't `export` command in `cmd`, use `set` instead. Then the whole script will be looks like this: ``` set PORT=7777 node server.js ``` Note that the syntax in PowerShell is slightly different: ``` $env:PORT=7777 node server.js ```
14859259
replace a character in the string using DOS commands
10
2013-02-13 17:22:52
<p>I have a requirement in which I need to replace particular character from a string, by using a DOS command.</p> <p>For example, if my string is "1,2,3,4", I need to get the result "1.2.3.4" by replacing each "," with a "." character.</p>
30,277
1,668,527
2019-06-26 10:58:27
14,859,908
14
2013-02-13 17:57:33
1,982,474
2019-06-26 10:58:27
https://stackoverflow.com/q/14859259
https://stackoverflow.com/a/14859908
<p>Following will work for you </p> <pre><code> @echo off set string1=1,2,3,4 set string2=%string1:,=.% echo %string2% </code></pre>
<p>Following will work for you </p> <pre><code> @echo off set string1=1,2,3,4 set string2=%string1:,=.% echo %string2% </code></pre>
1231, 5370, 7002
batch-file, command-line, dos
<h1>replace a character in the string using DOS commands</h1> <p>I have a requirement in which I need to replace particular character from a string, by using a DOS command.</p> <p>For example, if my string is "1,2,3,4", I need to get the result "1.2.3.4" by replacing each "," with a "." character.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,319
cmd
# replace a character in the string using DOS commands I have a requirement in which I need to replace particular character from a string, by using a DOS command. For example, if my string is "1,2,3,4", I need to get the result "1.2.3.4" by replacing each "," with a "." character.
Following will work for you ``` @echo off set string1=1,2,3,4 set string2=%string1:,=.% echo %string2% ```
7877495
How to pass arguments (not command line arguments) to functions within batch scripts
10
2011-10-24 14:49:24
<p>I'm writing a batch file for automating the creation of typical folder structures for products that we sell. I would like to be able to call my batch file with 2 optional arguments; the name of the supplier and a file for creating lots of folders at once. If no supplier is supplied the script asks via standard input...
45,360
467,859
2016-10-09 16:48:53
7,886,915
14
2011-10-25 08:57:41
463,115
2016-10-09 16:48:53
https://stackoverflow.com/q/7877495
https://stackoverflow.com/a/7886915
<p>I rebuild the file and it worked</p> <pre><code>@echo off set "supplier=C:\temp\supp\" set "product=Car" echo test1,myComment,myValue &gt; myFile.txt call :readFile "myFile.txt" EXIT /B :readFile echo "Reading from file: %~1" FOR /F "usebackq delims=," %%a IN ("%~1") do ( call :makeFolder %%a ) goto:EOF :make...
<p>I rebuild the file and it worked</p> <pre><code>@echo off set "supplier=C:\temp\supp\" set "product=Car" echo test1,myComment,myValue &gt; myFile.txt call :readFile "myFile.txt" EXIT /B :readFile echo "Reading from file: %~1" FOR /F "usebackq delims=," %%a IN ("%~1") do ( call :makeFolder %%a ) goto:EOF :make...
7002, 18362, 31134
argument-passing, batch-file, command-line-arguments
<h1>How to pass arguments (not command line arguments) to functions within batch scripts</h1> <p>I'm writing a batch file for automating the creation of typical folder structures for products that we sell. I would like to be able to call my batch file with 2 optional arguments; the name of the supplier and a file for c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,320
cmd
# How to pass arguments (not command line arguments) to functions within batch scripts I'm writing a batch file for automating the creation of typical folder structures for products that we sell. I would like to be able to call my batch file with 2 optional arguments; the name of the supplier and a file for creating l...
I rebuild the file and it worked ``` @echo off set "supplier=C:\temp\supp\" set "product=Car" echo test1,myComment,myValue > myFile.txt call :readFile "myFile.txt" EXIT /B :readFile echo "Reading from file: %~1" FOR /F "usebackq delims=," %%a IN ("%~1") do ( call :makeFolder %%a ) goto:EOF :makeFolder if "%1"=...
6824477
Script to start traceroute if continuous ping fails, output to log
10
2011-07-26 02:07:08
<p>I want to continuously ping my home public IP address, and if the ping fails automatically do a traceroute to see where it's failing.</p> <p>I've been trying to follow the comments made here:</p> <p><a href="http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/efc97c66-60a6-4fd7-8be4-4b454d040ce5" rel="nor...
58,570
533,226
2018-03-02 19:11:48
6,837,400
14
2011-07-26 22:31:16
533,226
2011-07-26 22:31:16
https://stackoverflow.com/q/6824477
https://stackoverflow.com/a/6837400
<pre><code>@echo off set Address=google.com :Loop PING -n 5 127.0.0.1&gt;nul echo Pinging %Address% %SystemRoot%\system32\ping.exe -n 1 %Address% | %SystemRoot%\system32\find.exe "TTL=" &gt; NUL &gt;&gt; C:\pingtest\logfile.log if %ERRORLEVEL% EQU 0 goto :Loop echo Trace route %Address% at %date% %time% &gt;&gt; C:\pin...
<pre><code>@echo off set Address=google.com :Loop PING -n 5 127.0.0.1&gt;nul echo Pinging %Address% %SystemRoot%\system32\ping.exe -n 1 %Address% | %SystemRoot%\system32\find.exe "TTL=" &gt; NUL &gt;&gt; C:\pingtest\logfile.log if %ERRORLEVEL% EQU 0 goto :Loop echo Trace route %Address% at %date% %time% &gt;&gt; C:\pin...
494, 5649, 5829, 7002
batch-file, ping, traceroute, vbscript
<h1>Script to start traceroute if continuous ping fails, output to log</h1> <p>I want to continuously ping my home public IP address, and if the ping fails automatically do a traceroute to see where it's failing.</p> <p>I've been trying to follow the comments made here:</p> <p><a href="http://social.technet.microsoft...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,321
cmd
# Script to start traceroute if continuous ping fails, output to log I want to continuously ping my home public IP address, and if the ping fails automatically do a traceroute to see where it's failing. I've been trying to follow the comments made here: <http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/e...
``` @echo off set Address=google.com :Loop PING -n 5 127.0.0.1>nul echo Pinging %Address% %SystemRoot%\system32\ping.exe -n 1 %Address% | %SystemRoot%\system32\find.exe "TTL=" > NUL >> C:\pingtest\logfile.log if %ERRORLEVEL% EQU 0 goto :Loop echo Trace route %Address% at %date% %time% >> C:\pingtest\logfile.log tracert...
4224586
How to call a batch file from another batch file with parameters that contain spaces?
10
2010-11-19 11:38:57
<p>I have 2 (maybe more in future) layers of batch files that are making my life easier up until the point I tried to add paths with spaces in them.</p> <p>Batch file 1:</p> <pre><code>@echo off set thinga=c:\final build set thingb=\\server\deployment for final buil echo. echo thing a: %thinga% echo thing b: %thingb...
20,284
177,651
2010-11-19 12:05:54
4,224,778
14
2010-11-19 12:05:54
234,152
2010-11-19 12:05:54
https://stackoverflow.com/q/4224586
https://stackoverflow.com/a/4224778
<p>Use this syntax:</p> <pre><code>set VAR="%~1" </code></pre> <p>The %~1 is the first parameter without quotes, then put quotes around it to correctly handle paths with spaces in them. Like that you are always on the safe side.</p>
<p>Use this syntax:</p> <pre><code>set VAR="%~1" </code></pre> <p>The %~1 is the first parameter without quotes, then put quotes around it to correctly handle paths with spaces in them. Like that you are always on the safe side.</p>
7002
batch-file
<h1>How to call a batch file from another batch file with parameters that contain spaces?</h1> <p>I have 2 (maybe more in future) layers of batch files that are making my life easier up until the point I tried to add paths with spaces in them.</p> <p>Batch file 1:</p> <pre><code>@echo off set thinga=c:\final build se...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,322
cmd
# How to call a batch file from another batch file with parameters that contain spaces? I have 2 (maybe more in future) layers of batch files that are making my life easier up until the point I tried to add paths with spaces in them. Batch file 1: ``` @echo off set thinga=c:\final build set thingb=\\server\deploymen...
Use this syntax: ``` set VAR="%~1" ``` The %~1 is the first parameter without quotes, then put quotes around it to correctly handle paths with spaces in them. Like that you are always on the safe side.
59394736
java.lang.IllegalStateException: ItemWriter must be provided after updating spring batch to 4.1.1
9
2019-12-18 15:01:02
<p>Previously, we were using <strong>Spring Batch 3.0.6</strong> and tried to update it to <strong>4.1.1</strong>. I have a job with only an <code>ItemReader</code> and an <code>ItemProcessor</code> - no <code>ItermWriter</code> provided. It was working fine before update.</p> <p>Now, I am getting: </p> <blockquote> ...
7,399
11,702,586
2019-12-18 18:30:12
59,395,422
14
2019-12-18 15:37:52
339,637
2019-12-18 15:37:52
https://stackoverflow.com/q/59394736
https://stackoverflow.com/a/59395422
<p><code>ItemWriter</code> become mandatory in <a href="https://github.com/spring-projects/spring-batch/issues/979" rel="noreferrer"><code>BATCH-2624</code></a>. Based on the information from the issue link , this change takes effect after version <code>3.0.10</code> , <code>4.0.2</code> and <code>4.1.0</code> </p> <...
<p><code>ItemWriter</code> become mandatory in <a href="https://github.com/spring-projects/spring-batch/issues/979" rel="noreferrer"><code>BATCH-2624</code></a>. Based on the information from the issue link , this change takes effect after version <code>3.0.10</code> , <code>4.0.2</code> and <code>4.1.0</code> </p> <...
17, 1211, 41895, 136102
java, spring, spring-batch, spring-batch-tasklet
<h1>java.lang.IllegalStateException: ItemWriter must be provided after updating spring batch to 4.1.1</h1> <p>Previously, we were using <strong>Spring Batch 3.0.6</strong> and tried to update it to <strong>4.1.1</strong>. I have a job with only an <code>ItemReader</code> and an <code>ItemProcessor</code> - no <code>Ite...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,323
cmd
# java.lang.IllegalStateException: ItemWriter must be provided after updating spring batch to 4.1.1 Previously, we were using **Spring Batch 3.0.6** and tried to update it to **4.1.1**. I have a job with only an `ItemReader` and an `ItemProcessor` - no `ItermWriter` provided. It was working fine before update. Now, I...
`ItemWriter` become mandatory in [`BATCH-2624`](https://github.com/spring-projects/spring-batch/issues/979). Based on the information from the issue link , this change takes effect after version `3.0.10` , `4.0.2` and `4.1.0` If you really do not need an `ItemWriter` , you can implement a dummy one: ``` public class ...
44238232
Define an in-memory JobRepository
9
2017-05-29 08:47:59
<p>I'm testing Spring Batch using Spring boot. My need is to define jobs working on an Oracle Database but I don't want to save jobs and steps states inside this DB. I've read in the documentation I can use a in-memory repository with the MapJobRepositoryFactoryBean.</p> <p>Then, I've implemented this bean:</p> <pre>...
25,191
975,621
2021-12-23 13:21:55
52,643,365
14
2018-10-04 09:26:48
975,621
2018-10-04 09:26:48
https://stackoverflow.com/q/44238232
https://stackoverflow.com/a/52643365
<p>With SpringBoot 2.x, the solution is simpler.</p> <p>You have to extend the <code>DefaultBatchConfigurer</code> class like this:</p> <pre><code>@Component public class NoPersistenceBatchConfigurer extends DefaultBatchConfigurer { @Override public void setDataSource(DataSource dataSource) { } } </code><...
<p>With SpringBoot 2.x, the solution is simpler.</p> <p>You have to extend the <code>DefaultBatchConfigurer</code> class like this:</p> <pre><code>@Component public class NoPersistenceBatchConfigurer extends DefaultBatchConfigurer { @Override public void setDataSource(DataSource dataSource) { } } </code><...
41895, 95875
spring-batch, spring-boot
<h1>Define an in-memory JobRepository</h1> <p>I'm testing Spring Batch using Spring boot. My need is to define jobs working on an Oracle Database but I don't want to save jobs and steps states inside this DB. I've read in the documentation I can use a in-memory repository with the MapJobRepositoryFactoryBean.</p> <p>T...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,324
cmd
# Define an in-memory JobRepository I'm testing Spring Batch using Spring boot. My need is to define jobs working on an Oracle Database but I don't want to save jobs and steps states inside this DB. I've read in the documentation I can use a in-memory repository with the MapJobRepositoryFactoryBean. Then, I've implem...
With SpringBoot 2.x, the solution is simpler. You have to extend the `DefaultBatchConfigurer` class like this: ``` @Component public class NoPersistenceBatchConfigurer extends DefaultBatchConfigurer { @Override public void setDataSource(DataSource dataSource) { } } ``` Without datasource, the framework a...
41310830
Error using ffmpeg and libvpx to encode webm from many images
9
2016-12-24 06:12:15
<p>The command I used was :</p> <pre><code>C:\cmd\ffmpeg\bin\ffmpeg.exe -i "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png" -c:v libvpx -b:v 1M "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\video.webm" -y </code></pre> <p>The output was:</p> <pre><code>ffmpeg version N-82889-g54931f...
4,460
3,016,026
2016-12-24 06:48:25
41,311,048
14
2016-12-24 06:48:25
5,726,027
2016-12-24 06:48:25
https://stackoverflow.com/q/41310830
https://stackoverflow.com/a/41311048
<p>Like the error msg says, <code>Transparency encoding with auto_alt_ref does not work</code>, so</p> <pre><code>ffmpeg.exe -i "out%d.png" -c:v libvpx -b:v 1M -auto-alt-ref 0 "video.webm" -y </code></pre>
<p>Like the error msg says, <code>Transparency encoding with auto_alt_ref does not work</code>, so</p> <pre><code>ffmpeg.exe -i "out%d.png" -c:v libvpx -b:v 1M -auto-alt-ref 0 "video.webm" -y </code></pre>
2631, 3847, 59110
cmd, ffmpeg, libvpx
<h1>Error using ffmpeg and libvpx to encode webm from many images</h1> <p>The command I used was :</p> <pre><code>C:\cmd\ffmpeg\bin\ffmpeg.exe -i "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png" -c:v libvpx -b:v 1M "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\video.webm" -y </code></...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,325
cmd
# Error using ffmpeg and libvpx to encode webm from many images The command I used was : ``` C:\cmd\ffmpeg\bin\ffmpeg.exe -i "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\out\out%d.png" -c:v libvpx -b:v 1M "C:\Users\user\Dropbox\Workspace - C#\SnowflakeGenerator\video.webm" -y ``` The output was: ``` ffm...
Like the error msg says, `Transparency encoding with auto_alt_ref does not work`, so ``` ffmpeg.exe -i "out%d.png" -c:v libvpx -b:v 1M -auto-alt-ref 0 "video.webm" -y ```
35186560
URL Encode in Windows Batch Script
9
2016-02-03 20:02:06
<p>I have a Windows batch script that I use to do quick Google searches. However, I can't figure out how to generically encode special characters. Like if I try to search for C#, the pound sign breaks it. Here is my code:</p> <pre><code>SET q="https://www.google.com/#q=%*" SET q=%q: =+% chrm %q% </code></pre>
11,715
5,879,690
2016-03-01 16:15:39
35,187,347
14
2016-02-03 20:45:37
388,389
2016-02-03 20:45:37
https://stackoverflow.com/q/35186560
https://stackoverflow.com/a/35187347
<p>Without installing any external tools:</p> <pre><code>@echo off setlocal set "string=gibberish+?blahblah@" :: Define simple macros to support JavaScript within batch set "beginJS=mshta "javascript:code(close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(" set "endJS=)));"" :: FOR...
<p>Without installing any external tools:</p> <pre><code>@echo off setlocal set "string=gibberish+?blahblah@" :: Define simple macros to support JavaScript within batch set "beginJS=mshta "javascript:code(close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(" set "endJS=)));"" :: FOR...
16, 58, 64, 7002
batch-file, linux, python, windows
<h1>URL Encode in Windows Batch Script</h1> <p>I have a Windows batch script that I use to do quick Google searches. However, I can't figure out how to generically encode special characters. Like if I try to search for C#, the pound sign breaks it. Here is my code:</p> <pre><code>SET q="https://www.google.com/#q=%*...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,326
cmd
# URL Encode in Windows Batch Script I have a Windows batch script that I use to do quick Google searches. However, I can't figure out how to generically encode special characters. Like if I try to search for C#, the pound sign breaks it. Here is my code: ``` SET q="https://www.google.com/#q=%*" SET q=%q: =+% chrm %q...
Without installing any external tools: ``` @echo off setlocal set "string=gibberish+?blahblah@" :: Define simple macros to support JavaScript within batch set "beginJS=mshta "javascript:code(close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(" set "endJS=)));"" :: FOR /F does not n...
32654896
Passing info between steps in Spring?
9
2015-09-18 14:48:39
<p>I'm trying to make a Spring Batch and I have no experience with it.</p> <p>Is it possible to pass information from each batch step or must they be completely independent?</p> <p>For example if I have</p> <pre><code> &lt;batch:step id="getSQLs" next="runSQLs"&gt; &lt;batch:tasklet transaction-manager="Tr...
39,328
2,665,166
2018-06-19 16:16:35
32,656,957
14
2015-09-18 16:34:33
2,106,516
2015-09-18 16:34:33
https://stackoverflow.com/q/32654896
https://stackoverflow.com/a/32656957
<p>Spring Batch supports pushing data to future job steps, and this can be done through the <code>ExecutionContext</code>, more precisely the <code>JobExecutionContext</code>. Here I'm referring to <a href="http://docs.spring.io/spring-batch/trunk/reference/html/patterns.html#passingDataToFutureSteps">example from the ...
<p>Spring Batch supports pushing data to future job steps, and this can be done through the <code>ExecutionContext</code>, more precisely the <code>JobExecutionContext</code>. Here I'm referring to <a href="http://docs.spring.io/spring-batch/trunk/reference/html/patterns.html#passingDataToFutureSteps">example from the ...
17, 1211, 41895
java, spring, spring-batch
<h1>Passing info between steps in Spring?</h1> <p>I'm trying to make a Spring Batch and I have no experience with it.</p> <p>Is it possible to pass information from each batch step or must they be completely independent?</p> <p>For example if I have</p> <pre><code> &lt;batch:step id="getSQLs" next="runSQLs"&gt; ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,327
cmd
# Passing info between steps in Spring? I'm trying to make a Spring Batch and I have no experience with it. Is it possible to pass information from each batch step or must they be completely independent? For example if I have ``` <batch:step id="getSQLs" next="runSQLs"> <batch:tasklet transaction-manager...
Spring Batch supports pushing data to future job steps, and this can be done through the `ExecutionContext`, more precisely the `JobExecutionContext`. Here I'm referring to [example from the official documentation](http://docs.spring.io/spring-batch/trunk/reference/html/patterns.html#passingDataToFutureSteps), as it is...
25199066
Rename all files in folder to uppercase with batch
9
2014-08-08 08:27:43
<p>Is there a way to rename all files in a specific folder to uppercase with batch file?<br> I found this code. But it renames files to lowercase. How to modify it to rename to uppercase instead?</p> <pre><code>for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f") </code></pre>
23,777
1,863,201
2020-10-24 15:03:37
25,199,223
14
2014-08-08 08:37:12
388,389
2014-08-08 08:37:12
https://stackoverflow.com/q/25199066
https://stackoverflow.com/a/25199223
<pre><code>@echo off setlocal enableDelayedExpansion pushd c:\some_dir for %%f in (*) do ( set "filename=%%~f" for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( set "filename=!filename:%%A=%%A!" ) ren "%%f" "!filename!" &gt;nul 2&gt;&amp;1 ) endlocal </code></pre>
<pre><code>@echo off setlocal enableDelayedExpansion pushd c:\some_dir for %%f in (*) do ( set "filename=%%~f" for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( set "filename=!filename:%%A=%%A!" ) ren "%%f" "!filename!" &gt;nul 2&gt;&amp;1 ) endlocal </code></pre>
5310, 7002, 12128
batch-file, file, file-management
<h1>Rename all files in folder to uppercase with batch</h1> <p>Is there a way to rename all files in a specific folder to uppercase with batch file?<br> I found this code. But it renames files to lowercase. How to modify it to rename to uppercase instead?</p> <pre><code>for /f "Tokens=*" %f in ('dir /l/b/a-d') do (ren...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,328
cmd
# Rename all files in folder to uppercase with batch Is there a way to rename all files in a specific folder to uppercase with batch file? I found this code. But it renames files to lowercase. How to modify it to rename to uppercase instead? ``` for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f") ```
``` @echo off setlocal enableDelayedExpansion pushd c:\some_dir for %%f in (*) do ( set "filename=%%~f" for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( set "filename=!filename:%%A=%%A!" ) ren "%%f" "!filename!" >nul 2>&1 ) endlocal ```
18002081
Error unzipping a file in cmd (using 7z in Windows)
9
2013-08-01 18:44:45
<p>I am attempting to use 7 Zip through the command line. As you can see below, using the command <code>7z l</code> lists the 3 files in the target zip file.</p> <pre><code>C:\Users\User1\Downloads&gt;7z l recording_20130731180507.zip -- Path = recording_20130731180507.zip Type = zip Physical Size = 311686 Date ...
12,510
2,611,688
2015-09-24 04:21:06
18,002,724
14
2013-08-01 19:20:04
1,630,171
2013-08-01 19:20:04
https://stackoverflow.com/q/18002081
https://stackoverflow.com/a/18002724
<p>The option is <code>-o</code>, not <code>o-</code>. Run the command like this:</p> <pre><code>7z e recording_20130731180507.zip -o"C:\users\User1\documents\folder1\test" </code></pre>
<p>The option is <code>-o</code>, not <code>o-</code>. Run the command like this:</p> <pre><code>7z e recording_20130731180507.zip -o"C:\users\User1\documents\folder1\test" </code></pre>
2631, 5680
7zip, cmd
<h1>Error unzipping a file in cmd (using 7z in Windows)</h1> <p>I am attempting to use 7 Zip through the command line. As you can see below, using the command <code>7z l</code> lists the 3 files in the target zip file.</p> <pre><code>C:\Users\User1\Downloads&gt;7z l recording_20130731180507.zip -- Path = recording_2...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,329
cmd
# Error unzipping a file in cmd (using 7z in Windows) I am attempting to use 7 Zip through the command line. As you can see below, using the command `7z l` lists the 3 files in the target zip file. ``` C:\Users\User1\Downloads>7z l recording_20130731180507.zip -- Path = recording_20130731180507.zip Type = zip Physic...
The option is `-o`, not `o-`. Run the command like this: ``` 7z e recording_20130731180507.zip -o"C:\users\User1\documents\folder1\test" ```
14204623
Automatic login to a website on windows 7/Chrome via batch file
9
2013-01-07 21:48:00
<p>I have a batch file. I have case select. if user types 26 it will open link 1 chrome. if user types 27 it will open link 2 in chrome.</p> <p>But I still can't figure out, how can I make batch login automatically into website with username and password.</p> <p>I looked for such a script on the google but didn't fin...
54,516
1,512,440
2019-09-20 04:51:14
14,476,249
14
2013-01-23 09:26:59
1,917,804
2019-09-20 04:51:14
https://stackoverflow.com/q/14204623
https://stackoverflow.com/a/14476249
<p>You can try the following code:</p> <pre><code>set WshShell = WScript.CreateObject("WScript.Shell") call WshShell.Run("http://www.gmail.com", 1, false) 'This will open your default browser WScript.Sleep 2000 WshShell.SendKeys "username" WScript.Sleep 1000 WshShell.SendKeys "{TAB}" WScript.Sleep 1000 WshShell.SendK...
<p>You can try the following code:</p> <pre><code>set WshShell = WScript.CreateObject("WScript.Shell") call WshShell.Run("http://www.gmail.com", 1, false) 'This will open your default browser WScript.Sleep 2000 WshShell.SendKeys "username" WScript.Sleep 1000 WshShell.SendKeys "{TAB}" WScript.Sleep 1000 WshShell.SendK...
3, 64, 494, 3600, 7002
batch-file, google-chrome, javascript, vbscript, windows
<h1>Automatic login to a website on windows 7/Chrome via batch file</h1> <p>I have a batch file. I have case select. if user types 26 it will open link 1 chrome. if user types 27 it will open link 2 in chrome.</p> <p>But I still can't figure out, how can I make batch login automatically into website with username and ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,330
cmd
# Automatic login to a website on windows 7/Chrome via batch file I have a batch file. I have case select. if user types 26 it will open link 1 chrome. if user types 27 it will open link 2 in chrome. But I still can't figure out, how can I make batch login automatically into website with username and password. I loo...
You can try the following code: ``` set WshShell = WScript.CreateObject("WScript.Shell") call WshShell.Run("http://www.gmail.com", 1, false) 'This will open your default browser WScript.Sleep 2000 WshShell.SendKeys "username" WScript.Sleep 1000 WshShell.SendKeys "{TAB}" WScript.Sleep 1000 WshShell.SendKeys "password"...
10544646
DIR output into BAT array?
9
2012-05-11 02:28:00
<p>Is there a way to read in the output of a 'dir' command into an array in a BAT file? Or would I need to output it to a file first, then read the file and delete the file after?</p> <p>The purpose is to get a list of folders in a directory, append a number to each and then prompt the user for a numerical input to se...
21,411
1,229,895
2019-04-03 18:14:22
10,545,035
14
2012-05-11 03:28:35
1,012,053
2012-05-11 03:28:35
https://stackoverflow.com/q/10544646
https://stackoverflow.com/a/10545035
<p>Batch does not formally support arrays, but you can emulate arrays using environment variables.</p> <pre><code>@echo off setlocal enableDelayedExpansion ::build "array" of folders set folderCnt=0 for /f "eol=: delims=" %%F in ('dir /b /ad *') do ( set /a folderCnt+=1 set "folder!folderCnt!=%%F" ) ::print menu...
<p>Batch does not formally support arrays, but you can emulate arrays using environment variables.</p> <pre><code>@echo off setlocal enableDelayedExpansion ::build "array" of folders set folderCnt=0 for /f "eol=: delims=" %%F in ('dir /b /ad *') do ( set /a folderCnt+=1 set "folder!folderCnt!=%%F" ) ::print menu...
114, 7002
arrays, batch-file
<h1>DIR output into BAT array?</h1> <p>Is there a way to read in the output of a 'dir' command into an array in a BAT file? Or would I need to output it to a file first, then read the file and delete the file after?</p> <p>The purpose is to get a list of folders in a directory, append a number to each and then prompt ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,331
cmd
# DIR output into BAT array? Is there a way to read in the output of a 'dir' command into an array in a BAT file? Or would I need to output it to a file first, then read the file and delete the file after? The purpose is to get a list of folders in a directory, append a number to each and then prompt the user for a n...
Batch does not formally support arrays, but you can emulate arrays using environment variables. ``` @echo off setlocal enableDelayedExpansion ::build "array" of folders set folderCnt=0 for /f "eol=: delims=" %%F in ('dir /b /ad *') do ( set /a folderCnt+=1 set "folder!folderCnt!=%%F" ) ::print menu for /l %%N in...
9995241
Is there Uninstall a program batch for windows?
9
2012-04-03 14:22:15
<p>I have several programs I want to uninstall from my computer (Windows 7 64bit).</p> <p>Is there a batch\script that can help me do it? or I need to do it one by one from Control Panel?</p> <p>If there isn't for Windows 7, is there something like this in XP?</p> <p>thanks, Dor.</p>
73,438
871,672
2020-03-11 09:05:42
9,995,380
14
2012-04-03 14:29:54
799,586
2012-05-21 15:49:50
https://stackoverflow.com/q/9995241
https://stackoverflow.com/a/9995380
<p>There isn't really an <code>uninstall</code> command kind of thing in cmd that I know of. You could however query this reg key</p> <p><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall</code></p> <p>(might also need to check <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\...
<p>There isn't really an <code>uninstall</code> command kind of thing in cmd that I know of. You could however query this reg key</p> <p><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall</code></p> <p>(might also need to check <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\...
2216, 7002, 14038, 34595
batch-file, uninstallation, windows-7, windows-xp
<h1>Is there Uninstall a program batch for windows?</h1> <p>I have several programs I want to uninstall from my computer (Windows 7 64bit).</p> <p>Is there a batch\script that can help me do it? or I need to do it one by one from Control Panel?</p> <p>If there isn't for Windows 7, is there something like this in XP?<...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,332
cmd
# Is there Uninstall a program batch for windows? I have several programs I want to uninstall from my computer (Windows 7 64bit). Is there a batch\script that can help me do it? or I need to do it one by one from Control Panel? If there isn't for Windows 7, is there something like this in XP? thanks, Dor.
There isn't really an `uninstall` command kind of thing in cmd that I know of. You could however query this reg key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall` (might also need to check `HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall` if you're on a 64-...
9402058
Batch String Concatenation
9
2012-02-22 20:01:59
<p>I am trying to create a batch string like this: <strong>>abcd_</strong></p> <p>I have a variable called soeid, with value as abcd. So this is what i am doing, but it does not work.</p> <pre><code>set soeid=abcd set "val1=&gt;" set "val2=_" set "str=%val1%%soeid%%val2%" echo %str% </code></pre>
43,175
557,429
2017-12-09 01:59:27
9,402,291
14
2012-02-22 20:18:25
1,012,053
2012-02-22 20:55:46
https://stackoverflow.com/q/9402058
https://stackoverflow.com/a/9402291
<p>I'm sure it is working just fine. To prove it, add <code>SET STR</code> after you define the value, and you will see the correct value.</p> <p>The problem you are having is when you try to echo the value, the line that is executing becomes: <code>echo &gt;abcd_</code>. The <code>&gt;</code> is not quoted or escaped...
<p>I'm sure it is working just fine. To prove it, add <code>SET STR</code> after you define the value, and you will see the correct value.</p> <p>The problem you are having is when you try to echo the value, the line that is executing becomes: <code>echo &gt;abcd_</code>. The <code>&gt;</code> is not quoted or escaped...
64, 2631, 7002
batch-file, cmd, windows
<h1>Batch String Concatenation</h1> <p>I am trying to create a batch string like this: <strong>>abcd_</strong></p> <p>I have a variable called soeid, with value as abcd. So this is what i am doing, but it does not work.</p> <pre><code>set soeid=abcd set "val1=&gt;" set "val2=_" set "str=%val1%%soeid%%val2%" echo %...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,333
cmd
# Batch String Concatenation I am trying to create a batch string like this: **>abcd_** I have a variable called soeid, with value as abcd. So this is what i am doing, but it does not work. ``` set soeid=abcd set "val1=>" set "val2=_" set "str=%val1%%soeid%%val2%" echo %str% ```
I'm sure it is working just fine. To prove it, add `SET STR` after you define the value, and you will see the correct value. The problem you are having is when you try to echo the value, the line that is executing becomes: `echo >abcd_`. The `>` is not quoted or escaped, so it is simply taking the ouput of ECHO with n...
8426736
"Last modified" time in the title or statusline
9
2011-12-08 05:47:26
<p>What would be the easiest way to display the <em>last modified</em> time of a file (the time at which the file was saved last) in the title or in the statusline?</p> <p>I have a few ideas, but they all require parsing the <em>dir</em> (oh, I forgot to mention, ... I'm using Windows XP and cmd) <em>command output</e...
2,158
62,699
2011-12-08 06:12:33
8,426,948
14
2011-12-08 06:12:33
348,785
2011-12-08 06:12:33
https://stackoverflow.com/q/8426736
https://stackoverflow.com/a/8426948
<pre><code>:set title titlestring=%{strftime('%c',getftime(expand('%')))} </code></pre>
<pre><code>:set title titlestring=%{strftime('%c',getftime(expand('%')))} </code></pre>
370, 2216, 2631
cmd, vim, windows-xp
<h1>"Last modified" time in the title or statusline</h1> <p>What would be the easiest way to display the <em>last modified</em> time of a file (the time at which the file was saved last) in the title or in the statusline?</p> <p>I have a few ideas, but they all require parsing the <em>dir</em> (oh, I forgot to mention...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,334
cmd
# "Last modified" time in the title or statusline What would be the easiest way to display the *last modified* time of a file (the time at which the file was saved last) in the title or in the statusline? I have a few ideas, but they all require parsing the *dir* (oh, I forgot to mention, ... I'm using Windows XP and...
``` :set title titlestring=%{strftime('%c',getftime(expand('%')))} ```
4098444
Move all files except some (file pattern) from a DOS command
9
2010-11-04 15:46:32
<p>From a DOS command I want to move all files that do not match a file name pattern. Something like this:</p> <p>For example I want to move all files that do not start with "aaa"</p> <pre><code>for %i in (*) do if not %i == aaa* move %i .\.. </code></pre>
43,687
497,343
2018-06-26 10:47:49
4,482,477
14
2010-12-19 10:15:31
547,355
2010-12-19 10:39:31
https://stackoverflow.com/q/4098444
https://stackoverflow.com/a/4482477
<p><strong>XCOPY</strong> is designed to work with '<em>exclude</em>' lists... See below:</p> <pre><code> dir /b /a-d "source"|findstr /b "aaa" &gt;"%temp%\aaafiles.tmp" xcopy "source" "destination\" /exclude:%temp%\aaafiles.tmp /y </code></pre> <p>The first line performs a <strong>DIR</strong> (directory) list...
<p><strong>XCOPY</strong> is designed to work with '<em>exclude</em>' lists... See below:</p> <pre><code> dir /b /a-d "source"|findstr /b "aaa" &gt;"%temp%\aaafiles.tmp" xcopy "source" "destination\" /exclude:%temp%\aaafiles.tmp /y </code></pre> <p>The first line performs a <strong>DIR</strong> (directory) list...
5370, 7002
batch-file, dos
<h1>Move all files except some (file pattern) from a DOS command</h1> <p>From a DOS command I want to move all files that do not match a file name pattern. Something like this:</p> <p>For example I want to move all files that do not start with "aaa"</p> <pre><code>for %i in (*) do if not %i == aaa* move %i .\.. </cod...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,335
cmd
# Move all files except some (file pattern) from a DOS command From a DOS command I want to move all files that do not match a file name pattern. Something like this: For example I want to move all files that do not start with "aaa" ``` for %i in (*) do if not %i == aaa* move %i .\.. ```
**XCOPY** is designed to work with '*exclude*' lists... See below: ``` dir /b /a-d "source"|findstr /b "aaa" >"%temp%\aaafiles.tmp" xcopy "source" "destination\" /exclude:%temp%\aaafiles.tmp /y ``` The first line performs a **DIR** (directory) listing of the *source* folder, listing files in bare format (**/b*...
55310573
WMIC command in batch outputting non UTF-8 text files
8
2019-03-23 04:18:00
<p>I'm using a WMIC command to output a list of SIDS and accompanying user profile names to text. From the text, I can edit a list of SIDS I need to add a set of registry keys to. However, the script that loops through the edited text file of SIDS is encoded in a format the script doesn't pick up and just fails to run....
4,816
5,173,029
2024-10-20 16:55:29
55,312,341
14
2019-03-23 09:28:05
2,861,476
2019-03-23 09:48:17
https://stackoverflow.com/q/55310573
https://stackoverflow.com/a/55312341
<p>The encoding of <code>wmic</code>'s output depends on where the output is being sent</p> <ul> <li>If you send the output to a disk file by using a redirection operator or the <code>/output</code> switch, <code>wmic</code> will use UCS-2 LE BOM</li> <li>If you send the output to the console or to a pipe, <code>wmic<...
<p>The encoding of <code>wmic</code>'s output depends on where the output is being sent</p> <ul> <li>If you send the output to a disk file by using a redirection operator or the <code>/output</code> switch, <code>wmic</code> will use UCS-2 LE BOM</li> <li>If you send the output to the console or to a pipe, <code>wmic<...
64, 2631, 7002, 8944, 61774
batch-file, cmd, utf-8, windows, wmic
<h1>WMIC command in batch outputting non UTF-8 text files</h1> <p>I'm using a WMIC command to output a list of SIDS and accompanying user profile names to text. From the text, I can edit a list of SIDS I need to add a set of registry keys to. However, the script that loops through the edited text file of SIDS is encode...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,336
cmd
# WMIC command in batch outputting non UTF-8 text files I'm using a WMIC command to output a list of SIDS and accompanying user profile names to text. From the text, I can edit a list of SIDS I need to add a set of registry keys to. However, the script that loops through the edited text file of SIDS is encoded in a fo...
The encoding of `wmic`'s output depends on where the output is being sent - If you send the output to a disk file by using a redirection operator or the `/output` switch, `wmic` will use UCS-2 LE BOM - If you send the output to the console or to a pipe, `wmic` will use OEM codepage If your scripts can not process the...
48235878
How to exit a batch function?
8
2018-01-13 00:40:22
<p>So I wanted to do something like this:</p> <pre><code>@echo off echo Before call :test echo After pause :test echo I'm in test! :end echo I shouldn't be here... </code></pre> <p>Such that it would call test after saying <code>Before</code> and before saying <code>After</code>. However, it keeps just saying <code...
16,956
8,960,551
2018-01-13 00:57:02
48,235,966
14
2018-01-13 00:57:02
2,128,947
2018-01-13 00:57:02
https://stackoverflow.com/q/48235878
https://stackoverflow.com/a/48235966
<p>Batch has no concept of "sections", "functions", "procedures" or "paragraphs". A label is simply a reference point. Execution does not stop when a label is reached, it simply continues through, line by line, until it reaches end-of-file, a <strong>CALL</strong> , a <strong>GOTO</strong> or an <strong>EXIT</strong>. ...
<p>Batch has no concept of "sections", "functions", "procedures" or "paragraphs". A label is simply a reference point. Execution does not stop when a label is reached, it simply continues through, line by line, until it reaches end-of-file, a <strong>CALL</strong> , a <strong>GOTO</strong> or an <strong>EXIT</strong>. ...
7002
batch-file
<h1>How to exit a batch function?</h1> <p>So I wanted to do something like this:</p> <pre><code>@echo off echo Before call :test echo After pause :test echo I'm in test! :end echo I shouldn't be here... </code></pre> <p>Such that it would call test after saying <code>Before</code> and before saying <code>After</cod...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,338
cmd
# How to exit a batch function? So I wanted to do something like this: ``` @echo off echo Before call :test echo After pause :test echo I'm in test! :end echo I shouldn't be here... ``` Such that it would call test after saying `Before` and before saying `After`. However, it keeps just saying `I shouldn't be here`...
Batch has no concept of "sections", "functions", "procedures" or "paragraphs". A label is simply a reference point. Execution does not stop when a label is reached, it simply continues through, line by line, until it reaches end-of-file, a **CALL** , a **GOTO** or an **EXIT**. This is why you get the message you mentio...
13525129
Python: How can I execute bat file in new cmd window?
8
2012-11-23 08:08:34
<p>In my python script:</p> <pre><code>p = Popen('a.bat') </code></pre> <p>The problem is that the output of the batch file is put to main console window in which I executed my python script... I want the output of the batch file to be shown in new console window. Any help would be appreciated. Thanks.</p>
14,508
678,558
2015-12-07 09:57:47
13,534,692
14
2012-11-23 19:14:06
205,580
2013-11-14 16:17:06
https://stackoverflow.com/q/13525129
https://stackoverflow.com/a/13534692
<p>You can set the <a href="http://docs.python.org/2/library/subprocess#subprocess.CREATE_NEW_CONSOLE" rel="noreferrer"><code>CREATE_NEW_CONSOLE</code></a> flag. For example:</p> <pre><code>import subprocess p = subprocess.Popen('a.bat', creationflags=subprocess.CREATE_NEW_CONSOLE) </code></pre> <p>The docs regardin...
<p>You can set the <a href="http://docs.python.org/2/library/subprocess#subprocess.CREATE_NEW_CONSOLE" rel="noreferrer"><code>CREATE_NEW_CONSOLE</code></a> flag. For example:</p> <pre><code>import subprocess p = subprocess.Popen('a.bat', creationflags=subprocess.CREATE_NEW_CONSOLE) </code></pre> <p>The docs regardin...
16, 7002
batch-file, python
<h1>Python: How can I execute bat file in new cmd window?</h1> <p>In my python script:</p> <pre><code>p = Popen('a.bat') </code></pre> <p>The problem is that the output of the batch file is put to main console window in which I executed my python script... I want the output of the batch file to be shown in new consol...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,340
cmd
# Python: How can I execute bat file in new cmd window? In my python script: ``` p = Popen('a.bat') ``` The problem is that the output of the batch file is put to main console window in which I executed my python script... I want the output of the batch file to be shown in new console window. Any help would be appre...
You can set the [`CREATE_NEW_CONSOLE`](http://docs.python.org/2/library/subprocess#subprocess.CREATE_NEW_CONSOLE) flag. For example: ``` import subprocess p = subprocess.Popen('a.bat', creationflags=subprocess.CREATE_NEW_CONSOLE) ``` The docs regarding `shell=True` are inconsistent with the [implementation](http://h...
7759156
Grid Size in Spring batch
8
2011-10-13 19:06:51
<p>I have batch job which reads data from bulk files, process it and insert in DB.</p> <p>I'm using spring's partitioning features using the default partition handler.</p> <pre><code> &lt;bean class="org.spr...TaskExecutorPartitionHandler"&gt; &lt;property name="taskExecutor" ref="taskExecutor"/&gt; ...
19,051
211,026
2016-12-02 14:37:16
7,762,996
14
2011-10-14 04:22:11
211,277
2011-10-14 04:27:57
https://stackoverflow.com/q/7759156
https://stackoverflow.com/a/7762996
<p><code>gridSize</code> specifies the number of <code>data blocks</code> to create to be processed by (usually) the same number of <code>workers</code>. Think about it as a number of mapped data blocks in a map/reduce.</p> <p>Using a <code>StepExecutionSplitter</code>, given the data, <code>PartitionHandler</code> "p...
<p><code>gridSize</code> specifies the number of <code>data blocks</code> to create to be processed by (usually) the same number of <code>workers</code>. Think about it as a number of mapped data blocks in a map/reduce.</p> <p>Using a <code>StepExecutionSplitter</code>, given the data, <code>PartitionHandler</code> "p...
17, 1211, 41895
java, spring, spring-batch
<h1>Grid Size in Spring batch</h1> <p>I have batch job which reads data from bulk files, process it and insert in DB.</p> <p>I'm using spring's partitioning features using the default partition handler.</p> <pre><code> &lt;bean class="org.spr...TaskExecutorPartitionHandler"&gt; &lt;property name="taskExe...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,341
cmd
# Grid Size in Spring batch I have batch job which reads data from bulk files, process it and insert in DB. I'm using spring's partitioning features using the default partition handler. ``` <bean class="org.spr...TaskExecutorPartitionHandler"> <property name="taskExecutor" ref="taskExecutor"/> ...
`gridSize` specifies the number of `data blocks` to create to be processed by (usually) the same number of `workers`. Think about it as a number of mapped data blocks in a map/reduce. Using a `StepExecutionSplitter`, given the data, `PartitionHandler` "partitions" / splits the data to a `gridSize` parts, and sends eac...
6887100
Django design pattern for web analytics screens that take a really long time to calculate
8
2011-07-31 02:05:50
<p>I have an "analytics dashboard" screen that is visible to my django web applications users that takes a really long time to calculate. It's one of these screens that goes through every single transaction in the database for a user and gives them metrics on it.</p> <p>I would love for this to be a realtime operatio...
1,281
36,680
2011-07-31 12:11:29
6,889,383
14
2011-07-31 12:11:29
29,451
2011-07-31 12:11:29
https://stackoverflow.com/q/6887100
https://stackoverflow.com/a/6889383
<p>What you're looking for is a combination of offline processing and caching. By offline, I mean that the computation logic happens outside the request-response cycle. By caching, I mean that the result of your expensive calculation is sufficiently valid for X time, during which you do not need to recalculate it for d...
<p>What you're looking for is a combination of offline processing and caching. By offline, I mean that the computation logic happens outside the request-response cycle. By caching, I mean that the result of your expensive calculation is sufficiently valid for X time, during which you do not need to recalculate it for d...
16, 243, 7002
batch-file, django, python
<h1>Django design pattern for web analytics screens that take a really long time to calculate</h1> <p>I have an "analytics dashboard" screen that is visible to my django web applications users that takes a really long time to calculate. It's one of these screens that goes through every single transaction in the databa...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,343
cmd
# Django design pattern for web analytics screens that take a really long time to calculate I have an "analytics dashboard" screen that is visible to my django web applications users that takes a really long time to calculate. It's one of these screens that goes through every single transaction in the database for a u...
What you're looking for is a combination of offline processing and caching. By offline, I mean that the computation logic happens outside the request-response cycle. By caching, I mean that the result of your expensive calculation is sufficiently valid for X time, during which you do not need to recalculate it for disp...
70971925
How to quickly close all open terminals in VS Code?
7
2022-02-03 13:12:59
<p>How to quickly close all open terminals in VS Code?</p> <p>I have a lot of opened terminals and I could go over them one by one and kill each one of them separately. Or I could select a few of them and then kill the selected batch. But both approaches are not convenient, since they require a lot of time. I have at l...
10,088
9,852,082
2022-02-09 20:18:13
70,974,819
14
2022-02-03 16:23:43
836,330
2022-02-09 20:18:13
https://stackoverflow.com/q/70971925
https://stackoverflow.com/a/70974819
<p>There is a <code>Terminal: Kill All Terminals</code> command, not bound to anything by default.</p> <p>You could make a keybinding for it like (in your <code>keybindings.json</code>):</p> <pre><code>{ &quot;key&quot;: &quot;ctrl+alt+k&quot;, // whatever you want here &quot;command&quot;: &quot;workbenc...
<p>There is a <code>Terminal: Kill All Terminals</code> command, not bound to anything by default.</p> <p>You could make a keybinding for it like (in your <code>keybindings.json</code>):</p> <pre><code>{ &quot;key&quot;: &quot;ctrl+alt+k&quot;, // whatever you want here &quot;command&quot;: &quot;workbenc...
391, 5779, 30645, 111608
batch-processing, kill, terminal, visual-studio-code
<h1>How to quickly close all open terminals in VS Code?</h1> <p>How to quickly close all open terminals in VS Code?</p> <p>I have a lot of opened terminals and I could go over them one by one and kill each one of them separately. Or I could select a few of them and then kill the selected batch. But both approaches are ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,345
cmd
# How to quickly close all open terminals in VS Code? How to quickly close all open terminals in VS Code? I have a lot of opened terminals and I could go over them one by one and kill each one of them separately. Or I could select a few of them and then kill the selected batch. But both approaches are not convenient,...
There is a `Terminal: Kill All Terminals` command, not bound to anything by default. You could make a keybinding for it like (in your `keybindings.json`): ``` { "key": "ctrl+alt+k", // whatever you want here "command": "workbench.action.terminal.killAll" } ``` Or search for the command in your `Keyboar...
56287143
what is the difference between DataSourceTransactionManager and ResourcelessTransactionManager?
7
2019-05-24 06:42:51
<p>What is the difference between <code>org.springframework.jdbc.datasource.DataSourceTransactionManager</code> and <code>org.springframework.batch.support.transaction.ResourcelessTransactionManager</code></p> <p> </p> <pre><code>&lt;bean id=&quot;batchTransactionManager&quot; class= &quot;org.springframework.batc...
7,842
5,714,432
2020-10-12 22:28:11
56,287,647
14
2019-05-24 07:20:07
5,019,386
2019-05-27 07:38:24
https://stackoverflow.com/q/56287143
https://stackoverflow.com/a/56287647
<p>Spring Batch requires a <code>PlatformTransactionManager</code> to apply its transaction semantics when driving a job and interacting with the job repository.</p> <p><code>ResourcelessTransactionManager</code> is a No-Op implementation of <code>PlatformTransactionManager</code> which means there will be no real tra...
<p>Spring Batch requires a <code>PlatformTransactionManager</code> to apply its transaction semantics when driving a job and interacting with the job repository.</p> <p><code>ResourcelessTransactionManager</code> is a No-Op implementation of <code>PlatformTransactionManager</code> which means there will be no real tra...
1211, 3550, 28803, 41895, 44078
spring, spring-batch, spring-transactions, transactionmanager, transactions
<h1>what is the difference between DataSourceTransactionManager and ResourcelessTransactionManager?</h1> <p>What is the difference between <code>org.springframework.jdbc.datasource.DataSourceTransactionManager</code> and <code>org.springframework.batch.support.transaction.ResourcelessTransactionManager</code></p> <p> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,346
cmd
# what is the difference between DataSourceTransactionManager and ResourcelessTransactionManager? What is the difference between `org.springframework.jdbc.datasource.DataSourceTransactionManager` and `org.springframework.batch.support.transaction.ResourcelessTransactionManager` ``` <bean id="batchTransactionManager" ...
Spring Batch requires a `PlatformTransactionManager` to apply its transaction semantics when driving a job and interacting with the job repository. `ResourcelessTransactionManager` is a No-Op implementation of `PlatformTransactionManager` which means there will be no real transaction ongoing against a transactional re...
36969586
Running visual studio code in the current folder with batch file
7
2016-05-01 17:21:21
<p>I can follow below sequence of actions to run the Visual Studio Code in the current folder.</p> <p>select the location bar in the current folder and run (ALT + D):</p> <p><code>cmd /k code .</code></p> <p>I've tried to wrap the code . in the batch file (and place it in a folder where is declared in the PATH varia...
13,781
180,714
2022-01-12 13:08:29
39,615,774
14
2016-09-21 11:49:56
1,987,507
2016-09-21 11:49:56
https://stackoverflow.com/q/36969586
https://stackoverflow.com/a/39615774
<p>this works for me, Do not omit the first empty quote</p> <p><code>Start "" "C:\Program Files (x86)\Microsoft VS Code\code.exe" &lt;path_to_dir&gt;\.</code></p>
<p>this works for me, Do not omit the first empty quote</p> <p><code>Start "" "C:\Program Files (x86)\Microsoft VS Code\code.exe" &lt;path_to_dir&gt;\.</code></p>
2631, 33953
cmd, visual-studio
<h1>Running visual studio code in the current folder with batch file</h1> <p>I can follow below sequence of actions to run the Visual Studio Code in the current folder.</p> <p>select the location bar in the current folder and run (ALT + D):</p> <p><code>cmd /k code .</code></p> <p>I've tried to wrap the code . in th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,348
cmd
# Running visual studio code in the current folder with batch file I can follow below sequence of actions to run the Visual Studio Code in the current folder. select the location bar in the current folder and run (ALT + D): `cmd /k code .` I've tried to wrap the code . in the batch file (and place it in a folder wh...
this works for me, Do not omit the first empty quote `Start "" "C:\Program Files (x86)\Microsoft VS Code\code.exe" <path_to_dir>\.`
27565209
Append dump to existing MySQL dump file
7
2014-12-19 11:32:27
<p>i need to Dump all data for 2 tables and a subset of data from another 2 tables in a MySQL database. So suppose i have tables t1,t2,t3,t4, I need full dump of t1 and t2 and get it using </p> <pre><code>mysqldump -u... -p... mydb t1 t2 &gt; mydb_tables.sql </code></pre> <p>Now, i need to append this .sql file with...
4,723
1,903,165
2016-04-03 12:46:04
27,565,833
14
2014-12-19 12:07:49
2,486,495
2016-04-03 12:46:04
https://stackoverflow.com/q/27565209
https://stackoverflow.com/a/27565833
<p>You can use append method, like we append the regular files</p> <pre><code>eg: cat file2 &gt;&gt; file1 </code></pre> <p>You can dump using <strong>">>"</strong> instead of <strong>">"</strong></p> <p><strong>">"</strong> overwrites the destination file where as <strong>">>"</strong> appends to destination fi...
<p>You can use append method, like we append the regular files</p> <pre><code>eg: cat file2 &gt;&gt; file1 </code></pre> <p>You can dump using <strong>">>"</strong> instead of <strong>">"</strong></p> <p><strong>">"</strong> overwrites the destination file where as <strong>">>"</strong> appends to destination fi...
21, 4779, 7002
batch-file, dump, mysql
<h1>Append dump to existing MySQL dump file</h1> <p>i need to Dump all data for 2 tables and a subset of data from another 2 tables in a MySQL database. So suppose i have tables t1,t2,t3,t4, I need full dump of t1 and t2 and get it using </p> <pre><code>mysqldump -u... -p... mydb t1 t2 &gt; mydb_tables.sql </code></p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,349
cmd
# Append dump to existing MySQL dump file i need to Dump all data for 2 tables and a subset of data from another 2 tables in a MySQL database. So suppose i have tables t1,t2,t3,t4, I need full dump of t1 and t2 and get it using ``` mysqldump -u... -p... mydb t1 t2 > mydb_tables.sql ``` Now, i need to append this .s...
You can use append method, like we append the regular files ``` eg: cat file2 >> file1 ``` You can dump using **">>"** instead of **">"** **">"** overwrites the destination file where as **">>"** appends to destination file. ``` mysqldump -u... -p... mydb t1 t2 > mydb_tables.sql mysqldump -u... -p... mydb t3 ...
23996307
Set process priority on already running process batch file
7
2014-06-02 13:56:36
<p>How do i change the priority of an already running posses i now that i can use this to start the posses: <code>START /HIGH notepad.exe</code> but how do i change it for an already running notepad. Thanks if any one can help with this.</p>
15,743
2,964,427
2014-06-02 14:14:16
23,996,534
14
2014-06-02 14:07:31
654,946
2014-06-02 14:14:16
https://stackoverflow.com/q/23996307
https://stackoverflow.com/a/23996534
<p>Use <a href="http://msdn.microsoft.com/en-us/library/aa394531%28v=vs.85%29.aspx">wmic</a> (WMI command-line):</p> <pre><code>wmic process where name="notepad.exe" CALL setpriority "high priority" </code></pre> <p>The priority can be "idle", "below normal", "normal", "above normal", "high priority", "realtime", or ...
<p>Use <a href="http://msdn.microsoft.com/en-us/library/aa394531%28v=vs.85%29.aspx">wmic</a> (WMI command-line):</p> <pre><code>wmic process where name="notepad.exe" CALL setpriority "high priority" </code></pre> <p>The priority can be "idle", "below normal", "normal", "above normal", "high priority", "realtime", or ...
64, 7002, 34595
batch-file, windows, windows-7
<h1>Set process priority on already running process batch file</h1> <p>How do i change the priority of an already running posses i now that i can use this to start the posses: <code>START /HIGH notepad.exe</code> but how do i change it for an already running notepad. Thanks if any one can help with this.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,350
cmd
# Set process priority on already running process batch file How do i change the priority of an already running posses i now that i can use this to start the posses: `START /HIGH notepad.exe` but how do i change it for an already running notepad. Thanks if any one can help with this.
Use [wmic](http://msdn.microsoft.com/en-us/library/aa394531%28v=vs.85%29.aspx) (WMI command-line): ``` wmic process where name="notepad.exe" CALL setpriority "high priority" ``` The priority can be "idle", "below normal", "normal", "above normal", "high priority", "realtime", or an integer value. Integer values for ...
21456676
Batch Script - Variable Strings With Spaces
7
2014-01-30 12:33:14
<p>If I do:</p> <pre><code>set dir1= %ProgramFiles%\Backup\files set dir2= %ProgramFiles%\Backup\settings set backup = B:\backup start /b combine_file.exe %dir1% %dir2% </code></pre> <p>the above example just sees the first part i.e. <code>C:\program</code> and does not include the space yet. </p> <p>If I do <code>e...
36,547
3,251,405
2016-07-17 15:37:40
21,457,000
14
2014-01-30 12:48:14
2,861,476
2014-01-30 12:48:14
https://stackoverflow.com/q/21456676
https://stackoverflow.com/a/21457000
<pre><code>set "dir1=%ProgramFiles%\Backup\files" set "dir2=%ProgramFiles%\Backup\settings" set "backup=B:\backup" start /b combine_file.exe "%dir1%" "%dir2%" set /p "somepath=Enter Path" start /b combine_file.exe "%dir1%\%somepath%" </code></pre> <p>In general, use quotes on variable asignation to ensure the spaces...
<pre><code>set "dir1=%ProgramFiles%\Backup\files" set "dir2=%ProgramFiles%\Backup\settings" set "backup=B:\backup" start /b combine_file.exe "%dir1%" "%dir2%" set /p "somepath=Enter Path" start /b combine_file.exe "%dir1%\%somepath%" </code></pre> <p>In general, use quotes on variable asignation to ensure the spaces...
7002
batch-file
<h1>Batch Script - Variable Strings With Spaces</h1> <p>If I do:</p> <pre><code>set dir1= %ProgramFiles%\Backup\files set dir2= %ProgramFiles%\Backup\settings set backup = B:\backup start /b combine_file.exe %dir1% %dir2% </code></pre> <p>the above example just sees the first part i.e. <code>C:\program</code> and doe...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,351
cmd
# Batch Script - Variable Strings With Spaces If I do: ``` set dir1= %ProgramFiles%\Backup\files set dir2= %ProgramFiles%\Backup\settings set backup = B:\backup start /b combine_file.exe %dir1% %dir2% ``` the above example just sees the first part i.e. `C:\program` and does not include the space yet. If I do `echo ...
``` set "dir1=%ProgramFiles%\Backup\files" set "dir2=%ProgramFiles%\Backup\settings" set "backup=B:\backup" start /b combine_file.exe "%dir1%" "%dir2%" set /p "somepath=Enter Path" start /b combine_file.exe "%dir1%\%somepath%" ``` In general, use quotes on variable asignation to ensure the spaces are correctly handl...
20692490
CreateProcess( ) doesn't create a new window with CREATE_NEW_CONSOLE flag - C/C++
7
2013-12-19 21:57:33
<p>I've been trying to create a process with CreateProcess() using the Windows API of course. I haven't been able to create a new console for some reason even after scouring the web. </p> <p><strong>Reasearch I've Done :</strong></p> <p>I used the MSDN example code as a base for the parameters I should use in the fu...
12,590
2,909,097
2013-12-20 01:49:34
20,695,004
14
2013-12-20 01:49:34
65,863
2013-12-20 01:49:34
https://stackoverflow.com/q/20692490
https://stackoverflow.com/a/20695004
<p><code>CREATE_NEW_CONSOLE</code> is a flag of <code>CreateProcess()</code> itself, not of <code>STARTUPINFO</code>. You are putting the flag in the wrong place. Try this instead:</p> <pre><code>int create_process( process * p, const char * exe_path, const char * cmd_line_args ) { ... return CreateProcessA(...
<p><code>CREATE_NEW_CONSOLE</code> is a flag of <code>CreateProcess()</code> itself, not of <code>STARTUPINFO</code>. You are putting the flag in the wrong place. Try this instead:</p> <pre><code>int create_process( process * p, const char * exe_path, const char * cmd_line_args ) { ... return CreateProcessA(...
8, 10, 889, 5910, 7002
batch-file, c, c++, process, winapi
<h1>CreateProcess( ) doesn't create a new window with CREATE_NEW_CONSOLE flag - C/C++</h1> <p>I've been trying to create a process with CreateProcess() using the Windows API of course. I haven't been able to create a new console for some reason even after scouring the web. </p> <p><strong>Reasearch I've Done :</stron...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,352
cmd
# CreateProcess( ) doesn't create a new window with CREATE_NEW_CONSOLE flag - C/C++ I've been trying to create a process with CreateProcess() using the Windows API of course. I haven't been able to create a new console for some reason even after scouring the web. **Reasearch I've Done :** I used the MSDN example cod...
`CREATE_NEW_CONSOLE` is a flag of `CreateProcess()` itself, not of `STARTUPINFO`. You are putting the flag in the wrong place. Try this instead: ``` int create_process( process * p, const char * exe_path, const char * cmd_line_args ) { ... return CreateProcessA( exe_path, ...
15351508
Using a WScript.shell activeX to execute a command line
7
2013-03-12 01:02:04
<p>I am working on calling a .exe file with a WScript.shell activeX. The file is wkhtmltopdf.exe and it is used to convert a HTML page to a .pdf. Everything is working well when I am just calling C:\wkhtmltopdf.exe in the code. It runs and then closes correctly. But my issue is you need to run it from cmd with the pro...
106,434
1,340,317
2016-08-30 13:28:10
15,351,708
14
2013-03-12 01:24:22
1,490,904
2013-03-12 01:31:55
https://stackoverflow.com/q/15351508
https://stackoverflow.com/a/15351708
<p>According to the following:</p> <p><a href="http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx</a></p> <p>You should be able to pass the commands directly as part of the <code>strCommand</code> param, you'd probabl...
<p>According to the following:</p> <p><a href="http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx</a></p> <p>You should be able to pass the commands directly as part of the <code>strCommand</code> param, you'd probabl...
3, 2628, 2631
activex, cmd, javascript
<h1>Using a WScript.shell activeX to execute a command line</h1> <p>I am working on calling a .exe file with a WScript.shell activeX. The file is wkhtmltopdf.exe and it is used to convert a HTML page to a .pdf. Everything is working well when I am just calling C:\wkhtmltopdf.exe in the code. It runs and then closes co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,353
cmd
# Using a WScript.shell activeX to execute a command line I am working on calling a .exe file with a WScript.shell activeX. The file is wkhtmltopdf.exe and it is used to convert a HTML page to a .pdf. Everything is working well when I am just calling C:\wkhtmltopdf.exe in the code. It runs and then closes correctly. B...
According to the following: <http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx> You should be able to pass the commands directly as part of the `strCommand` param, you'd probably be better off getting rid of the extra quotes wrapping the entire command and arguments: ``` function callShellApplicatio...
8547676
"Droplet" batch script - filenames containing ampersands
7
2011-12-17 20:20:34
<p>I'm trying to create a batch file that can have other files dropped onto it. Specifically, I'm using <a href="http://ffmpeg.org" rel="noreferrer">ffmpeg</a> to edit audio files produced by a handheld voice recorder. The problem is when using filenames with ampersands (&amp;). Even when quoting the input, anything af...
6,494
1,102,945
2019-06-12 00:17:37
8,550,398
14
2011-12-18 07:16:08
1,012,053
2011-12-18 14:09:07
https://stackoverflow.com/q/8547676
https://stackoverflow.com/a/8550398
<p>There is a long-standing bug in Windows drag and drop functionality regarding file paths that contain <code>&amp;</code> or <code>^</code> but don't contain a <code>&lt;space&gt;</code>.</p> <p>If a file path contains at least one <code>&lt;space&gt;</code>, then Windows automatically encloses the path in quotes so...
<p>There is a long-standing bug in Windows drag and drop functionality regarding file paths that contain <code>&amp;</code> or <code>^</code> but don't contain a <code>&lt;space&gt;</code>.</p> <p>If a file path contains at least one <code>&lt;space&gt;</code>, then Windows automatically encloses the path in quotes so...
64, 2833, 3847, 7002
batch-file, drag-and-drop, ffmpeg, windows
<h1>"Droplet" batch script - filenames containing ampersands</h1> <p>I'm trying to create a batch file that can have other files dropped onto it. Specifically, I'm using <a href="http://ffmpeg.org" rel="noreferrer">ffmpeg</a> to edit audio files produced by a handheld voice recorder. The problem is when using filenames...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,354
cmd
# "Droplet" batch script - filenames containing ampersands I'm trying to create a batch file that can have other files dropped onto it. Specifically, I'm using [ffmpeg](http://ffmpeg.org) to edit audio files produced by a handheld voice recorder. The problem is when using filenames with ampersands (&). Even when quoti...
There is a long-standing bug in Windows drag and drop functionality regarding file paths that contain `&` or `^` but don't contain a `<space>`. If a file path contains at least one `<space>`, then Windows automatically encloses the path in quotes so that it gets parsed properly. Windows should do the same thing if the...
7638924
Spring Batch SkipListener not called when exception occurs in reader
7
2011-10-03 18:11:54
<p>This is my step configuration. My skip listeners onSkipInWrite() method is called properly. But onSkipInRead() is not getting called. I found this by deliberately throwing a null pointer exception from my reader.</p> <pre><code>&lt;step id="callService" next="writeUsersAndResources"&gt; &lt;tasklet allow-st...
27,219
146,345
2022-12-20 10:15:23
7,648,914
14
2011-10-04 13:47:30
211,277
2011-10-04 15:59:20
https://stackoverflow.com/q/7638924
https://stackoverflow.com/a/7648914
<p>Skip listeners respect transaction boundary, which means they always be called just before the transaction is committed.</p> <p>Since a commit interval in your example is set to "10", the <code>onSkipInRead</code> will be called right at the moment of committing these 10 items (at once).</p> <p>Hence if you try to...
<p>Skip listeners respect transaction boundary, which means they always be called just before the transaction is committed.</p> <p>Since a commit interval in your example is set to "10", the <code>onSkipInRead</code> will be called right at the moment of committing these 10 items (at once).</p> <p>Hence if you try to...
1211, 41895
spring, spring-batch
<h1>Spring Batch SkipListener not called when exception occurs in reader</h1> <p>This is my step configuration. My skip listeners onSkipInWrite() method is called properly. But onSkipInRead() is not getting called. I found this by deliberately throwing a null pointer exception from my reader.</p> <pre><code>&lt;step i...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,355
cmd
# Spring Batch SkipListener not called when exception occurs in reader This is my step configuration. My skip listeners onSkipInWrite() method is called properly. But onSkipInRead() is not getting called. I found this by deliberately throwing a null pointer exception from my reader. ``` <step id="callService" next="w...
Skip listeners respect transaction boundary, which means they always be called just before the transaction is committed. Since a commit interval in your example is set to "10", the `onSkipInRead` will be called right at the moment of committing these 10 items (at once). Hence if you try to do a step by step debugging...
46908216
SLURM / Sbatch creates many small output files
6
2017-10-24 10:32:16
<p>I am running a pipeline on a SLURM-cluster, and for some reason a lot of smaller files (between 500 and 2000 bytes in size) named along the lines of <code>slurm-XXXXXX.out</code> (where <code>XXXXXX</code> is a number). I've tried to find out what these files are on the SLURM website, but I can't find any mention of...
7,077
2,795,726
2017-10-24 17:16:04
46,916,381
14
2017-10-24 17:16:04
6,446,385
2017-10-24 17:16:04
https://stackoverflow.com/q/46908216
https://stackoverflow.com/a/46916381
<p>You might want to take a look at the <a href="https://slurm.schedmd.com/sbatch.html" rel="noreferrer">sbatch</a> documentation. The files that you are referring to are essentially SLURM logs as explained there:</p> <blockquote> <p>By default both standard output and standard error are directed to a file of the...
<p>You might want to take a look at the <a href="https://slurm.schedmd.com/sbatch.html" rel="noreferrer">sbatch</a> documentation. The files that you are referring to are essentially SLURM logs as explained there:</p> <blockquote> <p>By default both standard output and standard error are directed to a file of the...
97759, 105553, 119019
sbatch, slurm, snakemake
<h1>SLURM / Sbatch creates many small output files</h1> <p>I am running a pipeline on a SLURM-cluster, and for some reason a lot of smaller files (between 500 and 2000 bytes in size) named along the lines of <code>slurm-XXXXXX.out</code> (where <code>XXXXXX</code> is a number). I've tried to find out what these files a...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,358
cmd
# SLURM / Sbatch creates many small output files I am running a pipeline on a SLURM-cluster, and for some reason a lot of smaller files (between 500 and 2000 bytes in size) named along the lines of `slurm-XXXXXX.out` (where `XXXXXX` is a number). I've tried to find out what these files are on the SLURM website, but I ...
You might want to take a look at the [sbatch](https://slurm.schedmd.com/sbatch.html) documentation. The files that you are referring to are essentially SLURM logs as explained there: > By default both standard output and standard error are directed to a > file of the name "slurm-%j.out", where the "%j" is replaced wit...
16509850
Running java files without ugly command prompt box in the background
6
2013-05-12 16:57:26
<p>I made a java program with a GUI using eclipse so whenever I want to run it I run it there, but my friend wants to run it on his computer so I made a class-file using javac in command prompt and also made a batch-file to run the program. The problem is that every time ha runs it this command window is still in the b...
4,701
2,375,330
2019-07-02 15:22:17
16,509,880
14
2013-05-12 16:59:30
418,556
2013-05-12 16:59:30
https://stackoverflow.com/q/16509850
https://stackoverflow.com/a/16509880
<p>Launch it with <code>javaw</code> instead of <code>java</code>. The <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html#description">Description for <code>java</code></a> mentions:</p> <blockquote> <p>The <code>javaw</code> command is identical to <code>java</code>, except that with <...
<p>Launch it with <code>javaw</code> instead of <code>java</code>. The <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html#description">Description for <code>java</code></a> mentions:</p> <blockquote> <p>The <code>javaw</code> command is identical to <code>java</code>, except that with <...
17, 2631, 7427
cmd, java, javac
<h1>Running java files without ugly command prompt box in the background</h1> <p>I made a java program with a GUI using eclipse so whenever I want to run it I run it there, but my friend wants to run it on his computer so I made a class-file using javac in command prompt and also made a batch-file to run the program. T...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,360
cmd
# Running java files without ugly command prompt box in the background I made a java program with a GUI using eclipse so whenever I want to run it I run it there, but my friend wants to run it on his computer so I made a class-file using javac in command prompt and also made a batch-file to run the program. The proble...
Launch it with `javaw` instead of `java`. The [Description for `java`](http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html#description) mentions: > The `javaw` command is identical to `java`, except that with `javaw` there is no associated console window. Use `javaw` when you don't want a command pr...
13915536
yes/no batch file
6
2012-12-17 13:57:21
<p>In my batch file I want to ask the user a question.</p> <p>I wrote the following:</p> <pre><code>SET /P ANSWER=Click Y to continue or N to stop (Y/N) </code></pre> <p>but I get the message without the last <code>)</code>.</p> <p>Someone know why?</p> <p>Thanks!</p>
17,930
1,632,792
2016-11-29 06:07:59
13,915,595
14
2012-12-17 14:01:32
73,070
2012-12-17 14:58:55
https://stackoverflow.com/q/13915536
https://stackoverflow.com/a/13915595
<p>Because you're using that prompt within a parenthesised block, e.g.</p> <pre><code>if ... ( ... set /P ANSWER=Blah (Y/N) ) </code></pre> <p>or</p> <pre><code>for %%x in (...) do ( ... set /P ANSWER=Blah (Y/N) ) </code></pre> <p>You have to escape the closing parenthesis in that case:</p> <pre><code>SET ...
<p>Because you're using that prompt within a parenthesised block, e.g.</p> <pre><code>if ... ( ... set /P ANSWER=Blah (Y/N) ) </code></pre> <p>or</p> <pre><code>for %%x in (...) do ( ... set /P ANSWER=Blah (Y/N) ) </code></pre> <p>You have to escape the closing parenthesis in that case:</p> <pre><code>SET ...
7002
batch-file
<h1>yes/no batch file</h1> <p>In my batch file I want to ask the user a question.</p> <p>I wrote the following:</p> <pre><code>SET /P ANSWER=Click Y to continue or N to stop (Y/N) </code></pre> <p>but I get the message without the last <code>)</code>.</p> <p>Someone know why?</p> <p>Thanks!</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,361
cmd
# yes/no batch file In my batch file I want to ask the user a question. I wrote the following: ``` SET /P ANSWER=Click Y to continue or N to stop (Y/N) ``` but I get the message without the last `)`. Someone know why? Thanks!
Because you're using that prompt within a parenthesised block, e.g. ``` if ... ( ... set /P ANSWER=Blah (Y/N) ) ``` or ``` for %%x in (...) do ( ... set /P ANSWER=Blah (Y/N) ) ``` You have to escape the closing parenthesis in that case: ``` SET /P ANSWER=Click Y to continue or N to stop (Y/N^) ``` or quot...
11473854
"Error: Could not find or load main class My.class"
6
2012-07-13 15:45:44
<p>Im using Java SDK 1.7 on Windows 7 via cmd.exe . Up until a few hours ago everything was working correctly when suddenly I was unable to run my compiled class files, consistently presented with the error in the title.</p> <p>I seem to be able to compile my My.java file however I am unable to run the resulting class...
17,522
1,363,484
2017-01-25 14:30:54
11,473,942
14
2012-07-13 15:50:59
268,396
2012-07-13 15:50:59
https://stackoverflow.com/q/11473854
https://stackoverflow.com/a/11473942
<p>You should specify the classname instead of the file of the class to load. The difference is a simple matter of removing the <code>.class</code> extension.</p>
<p>You should specify the classname instead of the file of the class to load. The difference is a simple matter of removing the <code>.class</code> extension.</p>
17, 2631, 9938
cmd, command-prompt, java
<h1>"Error: Could not find or load main class My.class"</h1> <p>Im using Java SDK 1.7 on Windows 7 via cmd.exe . Up until a few hours ago everything was working correctly when suddenly I was unable to run my compiled class files, consistently presented with the error in the title.</p> <p>I seem to be able to compile m...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,362
cmd
# "Error: Could not find or load main class My.class" Im using Java SDK 1.7 on Windows 7 via cmd.exe . Up until a few hours ago everything was working correctly when suddenly I was unable to run my compiled class files, consistently presented with the error in the title. I seem to be able to compile my My.java file h...
You should specify the classname instead of the file of the class to load. The difference is a simple matter of removing the `.class` extension.
8688426
Execute stored procedure from cmd.exe?
6
2011-12-31 13:41:24
<p>Is there anyway to run a stored proc from cmd.exe ?</p> <p>p.s.<br> I know how to create exec file c# and to run it.</p> <p>I'm asking without any code : </p> <p>Just me and cmd.exe.</p> <h2>edit</h2> <p>me and cmd.exe : meaning I don't want to write any code. Internal SQL Server help exe files of sql is fine !...
31,698
859,154
2011-12-31 14:04:17
8,688,446
14
2011-12-31 13:47:23
1,044,340
2011-12-31 13:56:44
https://stackoverflow.com/q/8688426
https://stackoverflow.com/a/8688446
<p>Try using the <a href="http://msdn.microsoft.com/en-us/library/ms162773%28v=SQL.90%29.aspx">SQLCMD Utility</a> :</p> <p>An example:</p> <p><code>sqlcmd -E -S server_name -d database_name -Q "EXEC schema.storedprocedure parameter01, parameter02"</code></p> <p>If you'd like to explore other options I'd like to shar...
<p>Try using the <a href="http://msdn.microsoft.com/en-us/library/ms162773%28v=SQL.90%29.aspx">SQLCMD Utility</a> :</p> <p>An example:</p> <p><code>sqlcmd -E -S server_name -d database_name -Q "EXEC schema.storedprocedure parameter01, parameter02"</code></p> <p>If you'd like to explore other options I'd like to shar...
2631, 4527
cmd, sql-server-2005
<h1>Execute stored procedure from cmd.exe?</h1> <p>Is there anyway to run a stored proc from cmd.exe ?</p> <p>p.s.<br> I know how to create exec file c# and to run it.</p> <p>I'm asking without any code : </p> <p>Just me and cmd.exe.</p> <h2>edit</h2> <p>me and cmd.exe : meaning I don't want to write any code. Int...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,364
cmd
# Execute stored procedure from cmd.exe? Is there anyway to run a stored proc from cmd.exe ? p.s. I know how to create exec file c# and to run it. I'm asking without any code : Just me and cmd.exe. ## edit me and cmd.exe : meaning I don't want to write any code. Internal SQL Server help exe files of sql is fine...
Try using the [SQLCMD Utility](http://msdn.microsoft.com/en-us/library/ms162773%28v=SQL.90%29.aspx) : An example: `sqlcmd -E -S server_name -d database_name -Q "EXEC schema.storedprocedure parameter01, parameter02"` If you'd like to explore other options I'd like to share this link: [Command Prompt Utilities: Appli...
7179028
Batch file: suppress command error output when used in a for loop
6
2011-08-24 16:31:37
<p>I am iterating through the command output in a for loop. Consider the following code:</p> <pre><code>for /F "tokens=1 delims=?=" %%A in ('set __variable') do ( set %%A= ) </code></pre> <p>Basically I am trying to clear the value of every environment variable whose name starts with "__variable". However, if no such...
3,330
629,529
2011-08-24 21:23:32
7,179,358
14
2011-08-24 16:58:19
724,461
2011-08-24 16:58:19
https://stackoverflow.com/q/7179028
https://stackoverflow.com/a/7179358
<p>For Windows NT 4 and later, you will need to escape the pipe and redirection symbols, which is done by prefixing them with carets ( ˆ ):</p> <pre><code>for /F "tokens=1 delims=?=" %A in ('set __variable 2^&gt;NUL') do ( set %A= ) </code></pre>
<p>For Windows NT 4 and later, you will need to escape the pipe and redirection symbols, which is done by prefixing them with carets ( ˆ ):</p> <pre><code>for /F "tokens=1 delims=?=" %A in ('set __variable 2^&gt;NUL') do ( set %A= ) </code></pre>
7002
batch-file
<h1>Batch file: suppress command error output when used in a for loop</h1> <p>I am iterating through the command output in a for loop. Consider the following code:</p> <pre><code>for /F "tokens=1 delims=?=" %%A in ('set __variable') do ( set %%A= ) </code></pre> <p>Basically I am trying to clear the value of every en...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,365
cmd
# Batch file: suppress command error output when used in a for loop I am iterating through the command output in a for loop. Consider the following code: ``` for /F "tokens=1 delims=?=" %%A in ('set __variable') do ( set %%A= ) ``` Basically I am trying to clear the value of every environment variable whose name sta...
For Windows NT 4 and later, you will need to escape the pipe and redirection symbols, which is done by prefixing them with carets ( ˆ ): ``` for /F "tokens=1 delims=?=" %A in ('set __variable 2^>NUL') do ( set %A= ) ```
130273
.cmd and .bat file converting return code to an error message
6
2008-09-24 22:11:03
<p>I'm trying to automate a program I made with a test suite via a .cmd file.</p> <p>I can get the program that I ran's return code via %errorlevel%. </p> <p>My program has certain return codes for each type of error.</p> <p>For example: </p> <p>1 - means failed for such and such a reason</p> <p>2 - means failed f...
31,230
3,153
2019-02-19 18:31:53
130,319
14
2008-09-24 22:29:37
3,171
2008-09-24 22:29:37
https://stackoverflow.com/q/130273
https://stackoverflow.com/a/130319
<p>You can do this quite neatly with the <code>ENABLEDELAYEDEXPANSION</code> option. This allows you to use <code>!</code> as variable marker that is evaluated after <code>%</code>.</p> <pre><code>REM Turn on Delayed Expansion SETLOCAL ENABLEDELAYEDEXPANSION REM Define messages as variables with the ERRORLEVEL on th...
<p>You can do this quite neatly with the <code>ENABLEDELAYEDEXPANSION</code> option. This allows you to use <code>!</code> as variable marker that is evaluated after <code>%</code>.</p> <pre><code>REM Turn on Delayed Expansion SETLOCAL ENABLEDELAYEDEXPANSION REM Define messages as variables with the ERRORLEVEL on th...
487, 2631, 7002
batch-file, build-automation, cmd
<h1>.cmd and .bat file converting return code to an error message</h1> <p>I'm trying to automate a program I made with a test suite via a .cmd file.</p> <p>I can get the program that I ran's return code via %errorlevel%. </p> <p>My program has certain return codes for each type of error.</p> <p>For example: </p> <p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,366
cmd
# .cmd and .bat file converting return code to an error message I'm trying to automate a program I made with a test suite via a .cmd file. I can get the program that I ran's return code via %errorlevel%. My program has certain return codes for each type of error. For example: 1 - means failed for such and such a r...
You can do this quite neatly with the `ENABLEDELAYEDEXPANSION` option. This allows you to use `!` as variable marker that is evaluated after `%`. ``` REM Turn on Delayed Expansion SETLOCAL ENABLEDELAYEDEXPANSION REM Define messages as variables with the ERRORLEVEL on the end of the name SET MESSAGE0=Everything is fin...
30641383
Java 8 Stream with batch processing
132
2015-06-04 10:27:40
<p>I have a large file that contains a list of items.</p> <p>I would like to create a batch of items, make an HTTP request with this batch (all of the items are needed as parameters in the HTTP request). I can do it very easily with a <code>for</code> loop, but as Java 8 lover, I want to try writing this with Java 8'...
120,168
500,315
2025-03-24 21:35:10
30,662,609
13
2015-06-05 09:09:05
521,799
2019-03-04 12:56:41
https://stackoverflow.com/q/30641383
https://stackoverflow.com/a/30662609
<p>Note! <em>This solution reads the whole file before running the forEach.</em></p> <p>You could do it with <a href="https://github.com/jOOQ/jOOL" rel="nofollow noreferrer">jOOλ</a>, a library that extends Java 8 streams for single-threaded, sequential stream use-cases:</p> <pre><code>Seq.seq(lazyFileStream) ...
<p>Note! <em>This solution reads the whole file before running the forEach.</em></p> <p>You could do it with <a href="https://github.com/jOOQ/jOOL" rel="nofollow noreferrer">jOOλ</a>, a library that extends Java 8 streams for single-threaded, sequential stream use-cases:</p> <pre><code>Seq.seq(lazyFileStream) ...
17, 30645, 69385, 97192
batch-processing, java, java-8, java-stream
<h1>Java 8 Stream with batch processing</h1> <p>I have a large file that contains a list of items.</p> <p>I would like to create a batch of items, make an HTTP request with this batch (all of the items are needed as parameters in the HTTP request). I can do it very easily with a <code>for</code> loop, but as Java 8 l...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,367
cmd
# Java 8 Stream with batch processing I have a large file that contains a list of items. I would like to create a batch of items, make an HTTP request with this batch (all of the items are needed as parameters in the HTTP request). I can do it very easily with a `for` loop, but as Java 8 lover, I want to try writing ...
Note! *This solution reads the whole file before running the forEach.* You could do it with [jOOλ](https://github.com/jOOQ/jOOL), a library that extends Java 8 streams for single-threaded, sequential stream use-cases: ``` Seq.seq(lazyFileStream) // Seq<String> .zipWithIndex() // Seq<...
2643901
How can we stop a running java process through Windows cmd?
48
2010-04-15 08:54:32
<p>I am a newbie in cmd, so please allow me to ask a stupid question: How can we stop a running Java process through Windows cmd?</p> <p>For example, if we start Jetty (a mini web server) with the following command:</p> <pre><code>start javaw -jar start.jar </code></pre> <p>How do we find the process and stop it lat...
258,965
113,037
2022-03-31 13:32:06
2,644,654
13
2010-04-15 11:03:06
139,985
2021-06-29 11:47:41
https://stackoverflow.com/q/2643901
https://stackoverflow.com/a/2644654
<p>It is rather messy but you need to do something like the following:</p> <pre><code>START &quot;do something window&quot; dir FOR /F &quot;tokens=2&quot; %I in ('TASKLIST /NH /FI &quot;WINDOWTITLE eq do something window&quot;' ) DO SET PID=%I ECHO %PID% TASKKILL /PID %PID% </code></pre> <p>Found this on <a href="http...
<p>It is rather messy but you need to do something like the following:</p> <pre><code>START &quot;do something window&quot; dir FOR /F &quot;tokens=2&quot; %I in ('TASKLIST /NH /FI &quot;WINDOWTITLE eq do something window&quot;' ) DO SET PID=%I ECHO %PID% TASKKILL /PID %PID% </code></pre> <p>Found this on <a href="http...
17, 64, 2631, 7002
batch-file, cmd, java, windows
<h1>How can we stop a running java process through Windows cmd?</h1> <p>I am a newbie in cmd, so please allow me to ask a stupid question: How can we stop a running Java process through Windows cmd?</p> <p>For example, if we start Jetty (a mini web server) with the following command:</p> <pre><code>start javaw -jar s...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,368
cmd
# How can we stop a running java process through Windows cmd? I am a newbie in cmd, so please allow me to ask a stupid question: How can we stop a running Java process through Windows cmd? For example, if we start Jetty (a mini web server) with the following command: ``` start javaw -jar start.jar ``` How do we fin...
It is rather messy but you need to do something like the following: ``` START "do something window" dir FOR /F "tokens=2" %I in ('TASKLIST /NH /FI "WINDOWTITLE eq do something window"' ) DO SET PID=%I ECHO %PID% TASKKILL /PID %PID% ``` Found this on [this page](https://web.archive.org/web/20110731025432/http://it.too...
33638281
What is the reason for the error message "System cannot find the path specified"?
30
2015-11-10 19:46:24
<p>I have folder <code>run</code> in folder <code>system32</code>. When I run <code>cmd</code> from within Total Commander opening a command prompt window with <code>C:\Users\admin</code> as current directory and want to go into that folder, the following error message is output: </p> <blockquote> <p>System cannot f...
364,856
4,788,184
2022-07-22 11:12:10
33,665,997
13
2015-11-12 07:09:34
3,074,564
2020-06-27 15:50:08
https://stackoverflow.com/q/33638281
https://stackoverflow.com/a/33665997
<p>There is <strong>not only 1</strong> <code>%SystemRoot%\System32</code> on Windows x64. There are <strong>2</strong> such directories.</p> <p>The real <code>%SystemRoot%\System32</code> directory is for 64-bit applications. This directory contains a 64-bit <code>cmd.exe</code>.</p> <p>But there is also <code>%System...
<p>There is <strong>not only 1</strong> <code>%SystemRoot%\System32</code> on Windows x64. There are <strong>2</strong> such directories.</p> <p>The real <code>%SystemRoot%\System32</code> directory is for 64-bit applications. This directory contains a 64-bit <code>cmd.exe</code>.</p> <p>But there is also <code>%System...
218, 2631, 19886
cmd, directory, system32
<h1>What is the reason for the error message "System cannot find the path specified"?</h1> <p>I have folder <code>run</code> in folder <code>system32</code>. When I run <code>cmd</code> from within Total Commander opening a command prompt window with <code>C:\Users\admin</code> as current directory and want to go into ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,369
cmd
# What is the reason for the error message "System cannot find the path specified"? I have folder `run` in folder `system32`. When I run `cmd` from within Total Commander opening a command prompt window with `C:\Users\admin` as current directory and want to go into that folder, the following error message is output: ...
There is **not only 1** `%SystemRoot%\System32` on Windows x64. There are **2** such directories. The real `%SystemRoot%\System32` directory is for 64-bit applications. This directory contains a 64-bit `cmd.exe`. But there is also `%SystemRoot%\SysWOW64` for 32-bit applications. This directory is used if a 32-bit app...
817280
How does "FOR" work in cmd batch file?
23
2009-05-03 15:09:51
<p>I've been programming in dozens of languages for 20 years but I could never understand how "FOR" work in windows cmd shell batch file, no matter how hard I tried. I read </p> <p><a href="https://rads.stackoverflow.com/amzn/click/com/0470046163" rel="noreferrer" rel="nofollow noreferrer">http://www.amazon.com/Windo...
111,267
77,996
2017-04-06 16:40:55
818,596
13
2009-05-04 02:22:07
77,996
2009-05-04 03:06:20
https://stackoverflow.com/q/817280
https://stackoverflow.com/a/818596
<p>None of the answers actually work. I've managed to find the solution myself. This is a bit hackish, but it solve the problem for me:</p> <pre><code>echo off setlocal enableextensions setlocal enabledelayedexpansion set MAX_TRIES=100 set P=%PATH% for /L %%a in (1, 1, %MAX_TRIES%) do ( for /F "delims=;" %%g in ("!P...
<p>None of the answers actually work. I've managed to find the solution myself. This is a bit hackish, but it solve the problem for me:</p> <pre><code>echo off setlocal enableextensions setlocal enabledelayedexpansion set MAX_TRIES=100 set P=%PATH% for /L %%a in (1, 1, %MAX_TRIES%) do ( for /F "delims=;" %%g in ("!P...
227, 2631, 7002
batch-file, cmd, iteration
<h1>How does "FOR" work in cmd batch file?</h1> <p>I've been programming in dozens of languages for 20 years but I could never understand how "FOR" work in windows cmd shell batch file, no matter how hard I tried. I read </p> <p><a href="https://rads.stackoverflow.com/amzn/click/com/0470046163" rel="noreferrer" rel="...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,371
cmd
# How does "FOR" work in cmd batch file? I've been programming in dozens of languages for 20 years but I could never understand how "FOR" work in windows cmd shell batch file, no matter how hard I tried. I read [http://www.amazon.com/Windows-Administration-Command-Line-Vista/dp/0470046163/ref=sr_1_1?ie=UTF8&s=books&q...
None of the answers actually work. I've managed to find the solution myself. This is a bit hackish, but it solve the problem for me: ``` echo off setlocal enableextensions setlocal enabledelayedexpansion set MAX_TRIES=100 set P=%PATH% for /L %%a in (1, 1, %MAX_TRIES%) do ( for /F "delims=;" %%g in ("!P!") do ( e...
45301354
Weird control characters from Gradle in Windows 10
21
2017-07-25 11:00:53
<p>In the console I get "funky" output from Gradle when run from CMD since switching to Windows 10.</p> <pre><code>[0K [0K [2A[1m&lt;==-----------&gt; 18% EXECUTING [9s][m[34D[1B[1m&gt; :compileScala[m[15D[1B[2A[1m&lt;==-----------&gt; 18% EXECUTING [10s][m[35D[2B[2A[1m&lt;==-----------&gt; 18% EXECUTING [11s][m[35D[2...
7,400
482,808
2023-06-01 12:24:53
45,301,831
13
2017-07-25 11:24:21
1,089,967
2017-07-25 11:24:21
https://stackoverflow.com/q/45301354
https://stackoverflow.com/a/45301831
<p>I'm guessing you could pass <code>--console plain</code> in the gradle command line to disable the rich console which is likely the cause of the "funky" characters </p> <p><a href="https://docs.gradle.org/current/userguide/gradle_command_line.html" rel="noreferrer">https://docs.gradle.org/current/userguide/gradle_c...
<p>I'm guessing you could pass <code>--console plain</code> in the gradle command line to disable the rich console which is likely the cause of the "funky" characters </p> <p><a href="https://docs.gradle.org/current/userguide/gradle_command_line.html" rel="noreferrer">https://docs.gradle.org/current/userguide/gradle_c...
64, 2631, 32307, 40232, 107329
cmd, gradle, windows, windows-10, windows-console
<h1>Weird control characters from Gradle in Windows 10</h1> <p>In the console I get "funky" output from Gradle when run from CMD since switching to Windows 10.</p> <pre><code>[0K [0K [2A[1m&lt;==-----------&gt; 18% EXECUTING [9s][m[34D[1B[1m&gt; :compileScala[m[15D[1B[2A[1m&lt;==-----------&gt; 18% EXECUTING [10s][m[3...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,372
cmd
# Weird control characters from Gradle in Windows 10 In the console I get "funky" output from Gradle when run from CMD since switching to Windows 10. ``` [0K [0K [2A[1m<==-----------> 18% EXECUTING [9s][m[34D[1B[1m> :compileScala[m[15D[1B[2A[1m<==-----------> 18% EXECUTING [10s][m[35D[2B[2A[1m<==-----------> 18% EXEC...
I'm guessing you could pass `--console plain` in the gradle command line to disable the rich console which is likely the cause of the "funky" characters <https://docs.gradle.org/current/userguide/gradle_command_line.html>
4200316
How to receive even the strangest command line parameters?
17
2010-11-17 00:03:17
<p>as discussed in an other thread <a href="https://stackoverflow.com/questions/3813370/how-to-avoid-cmd-exe-interpreting-shell-special-characters-like">How to avoid cmd.exe interpreting shell special characters like &lt; > ^</a> it is not easy to get all parameters from the command line.</p> <p>A simple </p> <pre><c...
5,931
463,115
2019-04-15 13:08:56
9,871,083
13
2012-03-26 11:14:30
1,012,053
2012-08-09 18:39:44
https://stackoverflow.com/q/4200316
https://stackoverflow.com/a/9871083
<p>I don't think anyone found any holes in this, except for the inability to read newlines in the parameters:</p> <pre><code>@echo off setlocal enableDelayedExpansion set argCnt=1 :getArgs &gt;"%temp%\getArg.txt" &lt;"%temp%\getArg.txt" ( setlocal disableExtensions set prompt=# echo on for %%a in (%%a) do rem ...
<p>I don't think anyone found any holes in this, except for the inability to read newlines in the parameters:</p> <pre><code>@echo off setlocal enableDelayedExpansion set argCnt=1 :getArgs &gt;"%temp%\getArg.txt" &lt;"%temp%\getArg.txt" ( setlocal disableExtensions set prompt=# echo on for %%a in (%%a) do rem ...
4804, 7002
batch-file, escaping
<h1>How to receive even the strangest command line parameters?</h1> <p>as discussed in an other thread <a href="https://stackoverflow.com/questions/3813370/how-to-avoid-cmd-exe-interpreting-shell-special-characters-like">How to avoid cmd.exe interpreting shell special characters like &lt; > ^</a> it is not easy to get ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,373
cmd
# How to receive even the strangest command line parameters? as discussed in an other thread [How to avoid cmd.exe interpreting shell special characters like < > ^](https://stackoverflow.com/questions/3813370/how-to-avoid-cmd-exe-interpreting-shell-special-characters-like) it is not easy to get all parameters from the...
I don't think anyone found any holes in this, except for the inability to read newlines in the parameters: ``` @echo off setlocal enableDelayedExpansion set argCnt=1 :getArgs >"%temp%\getArg.txt" <"%temp%\getArg.txt" ( setlocal disableExtensions set prompt=# echo on for %%a in (%%a) do rem . %1. echo off e...
50209310
significance of "trainable" and "training" flag in tf.layers.batch_normalization
16
2018-05-07 07:42:56
<p>What is the significance of "trainable" and "training" flag in tf.layers.batch_normalization? How are these two different during training and prediction?</p>
4,624
8,884,381
2019-07-28 06:41:06
50,224,517
13
2018-05-08 01:24:13
8,143,158
2018-05-08 01:24:13
https://stackoverflow.com/q/50209310
https://stackoverflow.com/a/50224517
<p><strong>The batch norm has two phases:</strong></p> <pre><code>1. Training: - Normalize layer activations using `moving_avg`, `moving_var`, `beta` and `gamma` (`training`* should be `True`.) - update the `moving_avg` and `moving_var` statistics. (`trainable` should be `True`) 2. Inference: - ...
<p><strong>The batch norm has two phases:</strong></p> <pre><code>1. Training: - Normalize layer activations using `moving_avg`, `moving_var`, `beta` and `gamma` (`training`* should be `True`.) - update the `moving_avg` and `moving_var` statistics. (`trainable` should be `True`) 2. Inference: - ...
115813, 124994
batch-normalization, tensorflow
<h1>significance of "trainable" and "training" flag in tf.layers.batch_normalization</h1> <p>What is the significance of "trainable" and "training" flag in tf.layers.batch_normalization? How are these two different during training and prediction?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,374
cmd
# significance of "trainable" and "training" flag in tf.layers.batch_normalization What is the significance of "trainable" and "training" flag in tf.layers.batch_normalization? How are these two different during training and prediction?
**The batch norm has two phases:** ``` 1. Training: - Normalize layer activations using `moving_avg`, `moving_var`, `beta` and `gamma` (`training`* should be `True`.) - update the `moving_avg` and `moving_var` statistics. (`trainable` should be `True`) 2. Inference: - Normalize layer activation...
27802376
Create unique file name Windows batch
16
2015-01-06 16:00:30
<p>I have seen many posts about creating a unique filename from the naive %TIME% to the plausible (but insufficient) %RANDOM%. Using <code>wmic os get localdatetime</code> is much better, but it can still fail on multiple CPU/core machines. The following script will eventually fail when run in 5+ shells on a multple co...
26,488
447,901
2024-06-26 18:06:30
27,807,260
13
2015-01-06 21:12:30
1,012,053
2015-01-06 21:19:15
https://stackoverflow.com/q/27802376
https://stackoverflow.com/a/27807260
<p>Any system that relies on a random number can theoretically fail, even one using a GUID. But the world seems to have accepted that GUIDs are good enough. I've seen code posted somewhere that uses CSCRIPT JScript to generate a GUID.</p> <p>There are other ways:</p> <p>First I will assume that you are trying to crea...
<p>Any system that relies on a random number can theoretically fail, even one using a GUID. But the world seems to have accepted that GUIDs are good enough. I've seen code posted somewhere that uses CSCRIPT JScript to generate a GUID.</p> <p>There are other ways:</p> <p>First I will assume that you are trying to crea...
64, 2631, 7002
batch-file, cmd, windows
<h1>Create unique file name Windows batch</h1> <p>I have seen many posts about creating a unique filename from the naive %TIME% to the plausible (but insufficient) %RANDOM%. Using <code>wmic os get localdatetime</code> is much better, but it can still fail on multiple CPU/core machines. The following script will eventu...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,375
cmd
# Create unique file name Windows batch I have seen many posts about creating a unique filename from the naive %TIME% to the plausible (but insufficient) %RANDOM%. Using `wmic os get localdatetime` is much better, but it can still fail on multiple CPU/core machines. The following script will eventually fail when run i...
Any system that relies on a random number can theoretically fail, even one using a GUID. But the world seems to have accepted that GUIDs are good enough. I've seen code posted somewhere that uses CSCRIPT JScript to generate a GUID. There are other ways: First I will assume that you are trying to create a unique tempo...
25122103
how to select which spring batch job to run based on application argument - spring boot java config
16
2014-08-04 15:21:40
<p>I have two independent spring batch jobs in the same project because I want to use the same infrastructure-related beans. Everything is configured in Java. I would like to know if there's a proper way to start the jobs independent based for example on the first java app argument in the main method for example. If I ...
39,220
3,855,805
2020-05-07 09:48:43
25,185,150
13
2014-08-07 14:29:15
3,855,805
2014-08-11 10:30:35
https://stackoverflow.com/q/25122103
https://stackoverflow.com/a/25185150
<p>To run the jobs you like from the main method you can load the the required job configuration bean and the JobLauncher from the application context and then run it:</p> <pre><code>@ComponentScan @EnableAutoConfiguration public class ApplicationWithJobLauncher { public static void main(String[] args) throws Bea...
<p>To run the jobs you like from the main method you can load the the required job configuration bean and the JobLauncher from the application context and then run it:</p> <pre><code>@ComponentScan @EnableAutoConfiguration public class ApplicationWithJobLauncher { public static void main(String[] args) throws Bea...
1211, 41895, 95875, 97195
spring, spring-batch, spring-boot, spring-java-config
<h1>how to select which spring batch job to run based on application argument - spring boot java config</h1> <p>I have two independent spring batch jobs in the same project because I want to use the same infrastructure-related beans. Everything is configured in Java. I would like to know if there's a proper way to star...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,376
cmd
# how to select which spring batch job to run based on application argument - spring boot java config I have two independent spring batch jobs in the same project because I want to use the same infrastructure-related beans. Everything is configured in Java. I would like to know if there's a proper way to start the job...
To run the jobs you like from the main method you can load the the required job configuration bean and the JobLauncher from the application context and then run it: ``` @ComponentScan @EnableAutoConfiguration public class ApplicationWithJobLauncher { public static void main(String[] args) throws BeansException, J...
20883964
What is the max JDBC batch size?
16
2014-01-02 13:22:13
<p>I have a list and that list increasing continuously. I am doing add batch depend on the list size. I forgot to put limit for do executeBatch in specified size. </p> <p>Program is working for hours. I dont want to stop, fix and start again for now.</p> <p>My questions, what decides size of the adding batch? What is...
41,269
1,176,555
2014-12-08 01:52:32
20,887,293
13
2014-01-02 16:31:32
398,670
2014-12-08 01:52:32
https://stackoverflow.com/q/20883964
https://stackoverflow.com/a/20887293
<p>PgJDBC has some limitations regarding batches:</p> <ul> <li><p>All request values, and all results, must be accumulated in memory. This includes large blob/clob results. So free memory is the main limiting factor for batch size.</p></li> <li><p><a href="https://github.com/pgjdbc/pgjdbc/pull/204">Until PgJDBC 9.4 (n...
<p>PgJDBC has some limitations regarding batches:</p> <ul> <li><p>All request values, and all results, must be accumulated in memory. This includes large blob/clob results. So free memory is the main limiting factor for batch size.</p></li> <li><p><a href="https://github.com/pgjdbc/pgjdbc/pull/204">Until PgJDBC 9.4 (n...
17, 30, 256, 5617, 30645
batch-processing, database, java, jdbc, postgresql
<h1>What is the max JDBC batch size?</h1> <p>I have a list and that list increasing continuously. I am doing add batch depend on the list size. I forgot to put limit for do executeBatch in specified size. </p> <p>Program is working for hours. I dont want to stop, fix and start again for now.</p> <p>My questions, what...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,377
cmd
# What is the max JDBC batch size? I have a list and that list increasing continuously. I am doing add batch depend on the list size. I forgot to put limit for do executeBatch in specified size. Program is working for hours. I dont want to stop, fix and start again for now. My questions, what decides size of the add...
PgJDBC has some limitations regarding batches: - All request values, and all results, must be accumulated in memory. This includes large blob/clob results. So free memory is the main limiting factor for batch size. - [Until PgJDBC 9.4 (not yet released)](https://github.com/pgjdbc/pgjdbc/pull/204), [batches that return...
41900600
SLURM sbatch job array for the same script but with different input arguments run in parallel
15
2017-01-27 18:23:23
<p>I have a problem where I need to launch the same script but with different input arguments.</p> <p>Say I have a script <code>myscript.py -p &lt;par_Val&gt; -i &lt;num_trial&gt;</code>, where I need to consider <code>N</code> different <code>par_values</code> (between <code>x0</code> and <code>x1</code>) and M trial...
19,626
3,647,036
2017-05-09 23:08:53
41,903,276
13
2017-01-27 21:26:56
2,471,963
2017-01-29 12:53:10
https://stackoverflow.com/q/41900600
https://stackoverflow.com/a/41903276
<p>The best approach is to use job arrays.</p> <p>One option is to pass the parameter p1 when submitting the job script, so you will only have one script, but will have to submit it multiple times, once for each p1 value.</p> <p>The code will be like this (untested):</p> <pre><code>#!/bin/bash #SBATCH --job-name=cv_...
<p>The best approach is to use job arrays.</p> <p>One option is to pass the parameter p1 when submitting the job script, so you will only have one script, but will have to submit it multiple times, once for each p1 value.</p> <p>The code will be like this (untested):</p> <pre><code>#!/bin/bash #SBATCH --job-name=cv_...
114, 97759, 105553
arrays, sbatch, slurm
<h1>SLURM sbatch job array for the same script but with different input arguments run in parallel</h1> <p>I have a problem where I need to launch the same script but with different input arguments.</p> <p>Say I have a script <code>myscript.py -p &lt;par_Val&gt; -i &lt;num_trial&gt;</code>, where I need to consider <co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,378
cmd
# SLURM sbatch job array for the same script but with different input arguments run in parallel I have a problem where I need to launch the same script but with different input arguments. Say I have a script `myscript.py -p <par_Val> -i <num_trial>`, where I need to consider `N` different `par_values` (between `x0` a...
The best approach is to use job arrays. One option is to pass the parameter p1 when submitting the job script, so you will only have one script, but will have to submit it multiple times, once for each p1 value. The code will be like this (untested): ``` #!/bin/bash #SBATCH --job-name=cv_01 #SBATCH --output=cv_analy...
39715936
Add timestamp to log lines from batch output
14
2016-09-27 04:24:00
<p>I have a simple batch file that is scheduled to run, and essentially just backs up a remote network share to my computer.</p> <pre><code>@ECHO OFF xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i &gt;&gt; E:\backup\backup.log </code></pre> <p>The output in the log looks like this:</p> <pre><code>\\10.8.0.1\sh...
86,756
3,608,260
2018-08-10 08:56:17
39,717,744
13
2016-09-27 06:42:34
6,707,985
2018-08-10 08:56:17
https://stackoverflow.com/q/39715936
https://stackoverflow.com/a/39717744
<p>The standard variables <code>%date%</code>and <code>%time%</code> are what you are looking for.</p> <p>You can pass the lines of a command output as single lines with a for-loop and in between them </p> <pre><code>@echo off for /f "delims=" %%i in ('xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i') do ( e...
<p>The standard variables <code>%date%</code>and <code>%time%</code> are what you are looking for.</p> <p>You can pass the lines of a command output as single lines with a for-loop and in between them </p> <pre><code>@echo off for /f "delims=" %%i in ('xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i') do ( e...
64, 1263, 2177, 7002
batch-file, datetime, timestamp, windows
<h1>Add timestamp to log lines from batch output</h1> <p>I have a simple batch file that is scheduled to run, and essentially just backs up a remote network share to my computer.</p> <pre><code>@ECHO OFF xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i &gt;&gt; E:\backup\backup.log </code></pre> <p>The output in ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,379
cmd
# Add timestamp to log lines from batch output I have a simple batch file that is scheduled to run, and essentially just backs up a remote network share to my computer. ``` @ECHO OFF xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i >> E:\backup\backup.log ``` The output in the log looks like this: ``` \\10.8.0....
The standard variables `%date%`and `%time%` are what you are looking for. You can pass the lines of a command output as single lines with a for-loop and in between them ``` @echo off for /f "delims=" %%i in ('xcopy \\10.8.0.1\share\ E:\backup\ /c /s /r /d /y /i') do ( echo [%date%, %time%] %%i >> E:\backup\backup...
36291324
Batch File Command Hide Password
14
2016-03-29 17:39:34
<p>I have this batch file I wrote to open putty and want to make it a universal script for others. The script is as follows</p> <pre><code>@echo off ::Written by Mark Gulick:: ::Today's Date 20150316:: set /p U="Enter Username: " set /p P="Enter Password: " set /p DC="Enter DC Number: " start /d "C:\Program Files (x8...
49,161
6,130,698
2020-11-17 15:26:19
36,292,638
13
2016-03-29 18:46:06
3,080,770
2020-09-10 12:49:58
https://stackoverflow.com/q/36291324
https://stackoverflow.com/a/36292638
<p>You can do something like this :</p> <pre class="lang-bat prettyprint-override"><code>@echo off &amp; setlocal DisableDelayedExpansion Title %~n0 Mode 50,5 &amp; Color 0E set /p U=&quot;Enter Username : &quot; Call:InputPassword &quot;Enter Password&quot; P set /p DC=&quot;Enter DC Number: &quot; setlocal EnableDela...
<p>You can do something like this :</p> <pre class="lang-bat prettyprint-override"><code>@echo off &amp; setlocal DisableDelayedExpansion Title %~n0 Mode 50,5 &amp; Color 0E set /p U=&quot;Enter Username : &quot; Call:InputPassword &quot;Enter Password&quot; P set /p DC=&quot;Enter DC Number: &quot; setlocal EnableDela...
7002, 15125
batch-file, hide
<h1>Batch File Command Hide Password</h1> <p>I have this batch file I wrote to open putty and want to make it a universal script for others. The script is as follows</p> <pre><code>@echo off ::Written by Mark Gulick:: ::Today's Date 20150316:: set /p U="Enter Username: " set /p P="Enter Password: " set /p DC="Enter D...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,380
cmd
# Batch File Command Hide Password I have this batch file I wrote to open putty and want to make it a universal script for others. The script is as follows ``` @echo off ::Written by Mark Gulick:: ::Today's Date 20150316:: set /p U="Enter Username: " set /p P="Enter Password: " set /p DC="Enter DC Number: " start /d...
You can do something like this : ``` @echo off & setlocal DisableDelayedExpansion Title %~n0 Mode 50,5 & Color 0E set /p U="Enter Username : " Call:InputPassword "Enter Password" P set /p DC="Enter DC Number: " setlocal EnableDelayedExpansion start /d "C:\Program Files (x86)\putty\" PUTTY.EXE !U!@b0!DC!db -pw !P! paus...
8913119
In Windows, what's the difference between 2<&1 and 2>&1?
14
2012-01-18 15:53:19
<p>The examples and explanations in this page are leaving me confused:</p> <p><a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true" rel="noreferrer">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true</a><...
38,626
1,118,101
2012-01-18 16:35:17
8,913,797
13
2012-01-18 16:35:17
174,447
2012-01-18 16:35:17
https://stackoverflow.com/q/8913119
https://stackoverflow.com/a/8913797
<p>Some examples should show what happens: </p> <pre><code>c:\YourDir&gt; cd FolderNotHere &gt; nul The system cannot find the path specified. </code></pre> <p>You get the error stream</p> <pre><code>c:\YourDir&gt;cd FolderNotHere &gt; nul 2&gt;&amp;1 </code></pre> <p>You get nothing, the error stream goes to the...
<p>Some examples should show what happens: </p> <pre><code>c:\YourDir&gt; cd FolderNotHere &gt; nul The system cannot find the path specified. </code></pre> <p>You get the error stream</p> <pre><code>c:\YourDir&gt;cd FolderNotHere &gt; nul 2&gt;&amp;1 </code></pre> <p>You get nothing, the error stream goes to the...
64, 2631, 7002
batch-file, cmd, windows
<h1>In Windows, what's the difference between 2<&1 and 2>&1?</h1> <p>The examples and explanations in this page are leaving me confused:</p> <p><a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true" rel="noreferrer">http://www.microsoft.com/resources/document...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,381
cmd
# In Windows, what's the difference between 2<&1 and 2>&1? The examples and explanations in this page are leaving me confused: <http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true> Is there any practical difference between using 2<&1 and 2>&1? The second form (2>&...
Some examples should show what happens: ``` c:\YourDir> cd FolderNotHere > nul The system cannot find the path specified. ``` You get the error stream ``` c:\YourDir>cd FolderNotHere > nul 2>&1 ``` You get nothing, the error stream goes to the std output stream which goes to null. ``` c:\YourDir>cd > nul ``` You...
1732838
Folder Comparisons Via Command Line
14
2009-11-14 00:56:28
<p>I want to compare two folders on Windows (Vista, XP) which have a large number of huge files, which I need to compare. If I use Beyond Compare or such tool to compare the folders, it is taking a lot of time if I do it manually. I need to add that folder comparison to batch file.</p> <p>So on Windows (XP, Vista), is...
66,313
2,759,376
2020-01-29 03:31:06
1,732,908
13
2009-11-14 01:24:55
152,522
2009-11-14 01:24:55
https://stackoverflow.com/q/1732838
https://stackoverflow.com/a/1732908
<p>There is the built in command <code>COMP</code> that you could use. It depends a little bit on what you actually want to compare. </p> <blockquote> <p>Compares the contents of two files or sets of files.</p> <p>COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]</p> <p>data1 Specifies location ...
<p>There is the built in command <code>COMP</code> that you could use. It depends a little bit on what you actually want to compare. </p> <blockquote> <p>Compares the contents of two files or sets of files.</p> <p>COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C]</p> <p>data1 Specifies location ...
64, 218, 588, 2631
cmd, comparison, directory, windows
<h1>Folder Comparisons Via Command Line</h1> <p>I want to compare two folders on Windows (Vista, XP) which have a large number of huge files, which I need to compare. If I use Beyond Compare or such tool to compare the folders, it is taking a lot of time if I do it manually. I need to add that folder comparison to batc...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,382
cmd
# Folder Comparisons Via Command Line I want to compare two folders on Windows (Vista, XP) which have a large number of huge files, which I need to compare. If I use Beyond Compare or such tool to compare the folders, it is taking a lot of time if I do it manually. I need to add that folder comparison to batch file. ...
There is the built in command `COMP` that you could use. It depends a little bit on what you actually want to compare. > Compares the contents of two files or > sets of files. > > COMP [data1] [data2] [/D] [/A] [/L] > [/N=number] [/C] > > data1 Specifies location and > name(s) of first file(s) to compare. > > data2 Sp...
1100227
Adding editors in Visual Studio "Open With..." dialog box
14
2009-07-08 19:57:19
<p>I added a batch (.bat) file to my project. I want to add a new <em>editor</em> for batch files that would actually execute this batch file in command prompt window.</p> <p>What I did, but didn't remember my <em>editor</em>:</p> <ol> <li>Right clicked on my .bat file</li> <li>Selected <strong>Open with...</strong><...
7,782
75,642
2014-05-03 00:29:55
1,100,428
13
2009-07-08 20:37:32
75,642
2011-02-09 08:56:12
https://stackoverflow.com/q/1100227
https://stackoverflow.com/a/1100428
<p>Ok. I managed to solve this myself.<br> As I <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114952" rel="noreferrer">found on the internet</a> this is a Visual Studio bug, so it doesn't remember these kind of editors (parametrised executable file names). But nonetheless. The...
<p>Ok. I managed to solve this myself.<br> As I <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114952" rel="noreferrer">found on the internet</a> this is a Visual Studio bug, so it doesn't remember these kind of editors (parametrised executable file names). But nonetheless. The...
7002, 33953
batch-file, visual-studio
<h1>Adding editors in Visual Studio "Open With..." dialog box</h1> <p>I added a batch (.bat) file to my project. I want to add a new <em>editor</em> for batch files that would actually execute this batch file in command prompt window.</p> <p>What I did, but didn't remember my <em>editor</em>:</p> <ol> <li>Right click...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,383
cmd
# Adding editors in Visual Studio "Open With..." dialog box I added a batch (.bat) file to my project. I want to add a new *editor* for batch files that would actually execute this batch file in command prompt window. What I did, but didn't remember my *editor*: 1. Right clicked on my .bat file 2. Selected **Open wi...
Ok. I managed to solve this myself. As I [found on the internet](http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114952) this is a Visual Studio bug, so it doesn't remember these kind of editors (parametrised executable file names). But nonetheless. The solution goes like this: 1. Cre...
45799926
Why batch normalization over channels only in CNN
13
2017-08-21 14:40:57
<p>I am wondering, if in Convolutional Neural Networks batch normalization should be applied with respect to every pixel separately, or should I take the mean of pixels with respect to each channel?</p> <p>I saw that in the description of Tensorflow's <a href="https://www.tensorflow.org/api_docs/python/tf/layers/batch...
16,750
5,004,656
2025-03-17 19:06:26
46,948,566
13
2017-10-26 07:46:36
6,619,344
2022-11-08 10:53:24
https://stackoverflow.com/q/45799926
https://stackoverflow.com/a/46948566
<p>As far as I know, in feed-forward (dense) layers one applies batch normalization per each unit (neuron), because each of them has its own weights. Therefore, you normalize across feature axis.</p> <p>But, in convolutional layers, the weights are <em>shared</em> across inputs, i.e., each feature map applies the same ...
<p>As far as I know, in feed-forward (dense) layers one applies batch normalization per each unit (neuron), because each of them has its own weights. Therefore, you normalize across feature axis.</p> <p>But, in convolutional layers, the weights are <em>shared</em> across inputs, i.e., each feature map applies the same ...
5990, 16716, 21030, 124994
batch-normalization, computer-vision, convolution, machine-learning
<h1>Why batch normalization over channels only in CNN</h1> <p>I am wondering, if in Convolutional Neural Networks batch normalization should be applied with respect to every pixel separately, or should I take the mean of pixels with respect to each channel?</p> <p>I saw that in the description of Tensorflow's <a href=...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,385
cmd
# Why batch normalization over channels only in CNN I am wondering, if in Convolutional Neural Networks batch normalization should be applied with respect to every pixel separately, or should I take the mean of pixels with respect to each channel? I saw that in the description of Tensorflow's [tf.layers.batch_normali...
As far as I know, in feed-forward (dense) layers one applies batch normalization per each unit (neuron), because each of them has its own weights. Therefore, you normalize across feature axis. But, in convolutional layers, the weights are *shared* across inputs, i.e., each feature map applies the same transformation t...
4037471
Filter list of scheduled tasks by taskname
13
2010-10-27 20:34:42
<p>running the cmd command</p> <pre><code>schtasks /query /fo LIST </code></pre> <p>Gives me a list of all scheduled tasks running on my system. Example:</p> <pre><code>HostName: CHESTNUT105B TaskName: Calculator Next Run Time: 12:00:00, 10/28/2010 Status: Running HostName: CHESTNUT105B TaskNa...
43,721
315,828
2023-10-20 08:50:27
7,747,132
13
2011-10-12 22:00:23
492,141
2011-10-12 23:35:09
https://stackoverflow.com/q/4037471
https://stackoverflow.com/a/7747132
<p>Use <code>/</code> instead of <code>\</code>. This works just fine.</p> <pre><code>schtasks /query /fo LIST /tn Calculator </code></pre>
<p>Use <code>/</code> instead of <code>\</code>. This works just fine.</p> <pre><code>schtasks /query /fo LIST /tn Calculator </code></pre>
2631, 25235
cmd, windows-task-scheduler
<h1>Filter list of scheduled tasks by taskname</h1> <p>running the cmd command</p> <pre><code>schtasks /query /fo LIST </code></pre> <p>Gives me a list of all scheduled tasks running on my system. Example:</p> <pre><code>HostName: CHESTNUT105B TaskName: Calculator Next Run Time: 12:00:00, 10/28/2010 Status...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,386
cmd
# Filter list of scheduled tasks by taskname running the cmd command ``` schtasks /query /fo LIST ``` Gives me a list of all scheduled tasks running on my system. Example: ``` HostName: CHESTNUT105B TaskName: Calculator Next Run Time: 12:00:00, 10/28/2010 Status: Running HostName: CHESTNUT105...
Use `/` instead of `\`. This works just fine. ``` schtasks /query /fo LIST /tn Calculator ```
1217134
File-size and line-length limits for Windows batch files
13
2009-08-01 18:05:11
<p>I am generating a Windows batch file that might become quite large, say a few megabytes. I've searched for possible limits regarding the maximum file size and maximum length of a line in a batch file, but I couldn't find anything. Any practical experiences?</p>
24,944
42,645
2023-07-27 09:15:42
1,217,140
13
2009-08-01 18:12:31
34,065
2016-01-31 10:31:46
https://stackoverflow.com/q/1217134
https://stackoverflow.com/a/1217140
<p>I think filesize can be anything up to 2 GB, perhaps even more. It's an interpreted language, so if this is done right, filesize limit should be the filesize limit of the file system. I never had any errors with batch files being too large, and some of those I created were several MBs in size.</p> <p>There should b...
<p>I think filesize can be anything up to 2 GB, perhaps even more. It's an interpreted language, so if this is done right, filesize limit should be the filesize limit of the file system. I never had any errors with batch files being too large, and some of those I created were several MBs in size.</p> <p>There should b...
64, 7002
batch-file, windows
<h1>File-size and line-length limits for Windows batch files</h1> <p>I am generating a Windows batch file that might become quite large, say a few megabytes. I've searched for possible limits regarding the maximum file size and maximum length of a line in a batch file, but I couldn't find anything. Any practical experi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,387
cmd
# File-size and line-length limits for Windows batch files I am generating a Windows batch file that might become quite large, say a few megabytes. I've searched for possible limits regarding the maximum file size and maximum length of a line in a batch file, but I couldn't find anything. Any practical experiences?
I think filesize can be anything up to 2 GB, perhaps even more. It's an interpreted language, so if this is done right, filesize limit should be the filesize limit of the file system. I never had any errors with batch files being too large, and some of those I created were several MBs in size. There should be a line l...
29190444
Invalid syntax with "setx" for having more than two arguments when there are only two arguments
12
2015-03-22 02:56:24
<p>I'm having trouble setting the global environment variable <code>PATH</code> permanently with <code>SETX</code>.</p> <p>I've read the answers on similar questions such as <a href="https://stackoverflow.com/a/17215799/2886326">Invalid syntax with setx</a> as well as read the syntax on <a href="http://ss64.com/nt/set...
20,904
2,886,326
2016-06-21 12:13:52
29,194,542
13
2015-03-22 12:47:44
3,439,404
2015-03-22 17:34:24
https://stackoverflow.com/q/29190444
https://stackoverflow.com/a/29194542
<pre><code> echo %PATH% </code></pre> <p>If your (machine level) <code>%path%</code> ends with a trailing <code>\</code> reverse solidus (<em>backslash</em>), you should double it as follows:</p> <pre><code>if "%path:~-1%"=="\" ( SETX PATH "%PATH%\" ) else ( SETX PATH "%PATH%" ) </code></pre> <p>Resource: <a h...
<pre><code> echo %PATH% </code></pre> <p>If your (machine level) <code>%path%</code> ends with a trailing <code>\</code> reverse solidus (<em>backslash</em>), you should double it as follows:</p> <pre><code>if "%path:~-1%"=="\" ( SETX PATH "%PATH%\" ) else ( SETX PATH "%PATH%" ) </code></pre> <p>Resource: <a h...
2631, 9013, 81145, 93387
cmd, environment-variables, setx, windows-8.1
<h1>Invalid syntax with "setx" for having more than two arguments when there are only two arguments</h1> <p>I'm having trouble setting the global environment variable <code>PATH</code> permanently with <code>SETX</code>.</p> <p>I've read the answers on similar questions such as <a href="https://stackoverflow.com/a/172...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,388
cmd
# Invalid syntax with "setx" for having more than two arguments when there are only two arguments I'm having trouble setting the global environment variable `PATH` permanently with `SETX`. I've read the answers on similar questions such as [Invalid syntax with setx](https://stackoverflow.com/a/17215799/2886326) as we...
``` echo %PATH% ``` If your (machine level) `%path%` ends with a trailing `\` reverse solidus (*backslash*), you should double it as follows: ``` if "%path:~-1%"=="\" ( SETX PATH "%PATH%\" ) else ( SETX PATH "%PATH%" ) ``` Resource: [Syntax : Escape Characters, Delimiters and Quotes](http://ss64.com/nt/syntax...
15640599
Delete all files while maintaining directory structure
12
2013-03-26 15:12:51
<p>Given the directory structure c:\a\b\c\d\ - what DOS command will delete all files contained in c:\a along with any files in the subdirectories b, c, and d? We do not want to delete any directories - just files.</p>
24,866
47,281
2016-03-14 03:51:21
15,640,651
13
2013-03-26 15:15:01
15,393
2013-03-26 15:15:01
https://stackoverflow.com/q/15640599
https://stackoverflow.com/a/15640651
<p>The <code>DEL</code> command only deletes files, not directories, so the following command will do as you asked:</p> <pre><code>DEL /S C:\a </code></pre> <p>You need to use <code>RMDIR</code> to remove directories.</p>
<p>The <code>DEL</code> command only deletes files, not directories, so the following command will do as you asked:</p> <pre><code>DEL /S C:\a </code></pre> <p>You need to use <code>RMDIR</code> to remove directories.</p>
5370, 7002, 37510
batch-file, delete-file, dos
<h1>Delete all files while maintaining directory structure</h1> <p>Given the directory structure c:\a\b\c\d\ - what DOS command will delete all files contained in c:\a along with any files in the subdirectories b, c, and d? We do not want to delete any directories - just files.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,389
cmd
# Delete all files while maintaining directory structure Given the directory structure c:\a\b\c\d\ - what DOS command will delete all files contained in c:\a along with any files in the subdirectories b, c, and d? We do not want to delete any directories - just files.
The `DEL` command only deletes files, not directories, so the following command will do as you asked: ``` DEL /S C:\a ``` You need to use `RMDIR` to remove directories.
8513510
How to delete files containing certain string using batch file in Windows?
12
2011-12-15 00:07:45
<p>My Panasonic camera uses its stupid PHOTOfunSTUDIO to import photos. It creates folders by the name of the date when photos are taken, and imports photos into those folders respectively. So far so good. But If I import again before removing all old pictures from camera, the old ones will be imported again by adding ...
26,852
543,362
2017-05-10 07:08:51
8,513,601
13
2011-12-15 00:21:08
543,362
2011-12-15 00:21:08
https://stackoverflow.com/q/8513510
https://stackoverflow.com/a/8513601
<p>OK, maybe I was stupid. It does not need any batch:</p> <pre><code>del /s *(00?).* </code></pre>
<p>OK, maybe I was stupid. It does not need any batch:</p> <pre><code>del /s *(00?).* </code></pre>
7002, 37510
batch-file, delete-file
<h1>How to delete files containing certain string using batch file in Windows?</h1> <p>My Panasonic camera uses its stupid PHOTOfunSTUDIO to import photos. It creates folders by the name of the date when photos are taken, and imports photos into those folders respectively. So far so good. But If I import again before r...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,390
cmd
# How to delete files containing certain string using batch file in Windows? My Panasonic camera uses its stupid PHOTOfunSTUDIO to import photos. It creates folders by the name of the date when photos are taken, and imports photos into those folders respectively. So far so good. But If I import again before removing a...
OK, maybe I was stupid. It does not need any batch: ``` del /s *(00?).* ```
6737913
Using CALL for labels in a batch script
12
2011-07-18 18:59:52
<p>When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:eof, what happens from there? Does it return back to where the sub-routine's CALL is located? Or does it continue on after the location of the call script?</p> <p>For example:</p> <pre><code>ECHO It's for my colleg...
22,978
781,339
2019-07-20 12:33:12
6,737,975
13
2011-07-18 19:06:30
109,360
2019-07-20 12:33:12
https://stackoverflow.com/q/6737913
https://stackoverflow.com/a/6737975
<p>Why not just run it and see for yourself? I saved your script to a batch file called foo.bat, and I changed the <code>Your mom goes to college.</code> to have an <code>echo</code> in front.</p> <pre><code>C:\temp&gt;foo C:\temp&gt;ECHO It's for my college fund. It's for my college fund. C:\temp&gt;CALL :OMGSUB C...
<p>Why not just run it and see for yourself? I saved your script to a batch file called foo.bat, and I changed the <code>Your mom goes to college.</code> to have an <code>echo</code> in front.</p> <pre><code>C:\temp&gt;foo C:\temp&gt;ECHO It's for my college fund. It's for my college fund. C:\temp&gt;CALL :OMGSUB C...
2631, 7002, 8632, 21395
batch-file, call, cmd, subroutine
<h1>Using CALL for labels in a batch script</h1> <p>When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:eof, what happens from there? Does it return back to where the sub-routine's CALL is located? Or does it continue on after the location of the call script?</p> <p>For...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,391
cmd
# Using CALL for labels in a batch script When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:eof, what happens from there? Does it return back to where the sub-routine's CALL is located? Or does it continue on after the location of the call script? For example: ``` E...
Why not just run it and see for yourself? I saved your script to a batch file called foo.bat, and I changed the `Your mom goes to college.` to have an `echo` in front. ``` C:\temp>foo C:\temp>ECHO It's for my college fund. It's for my college fund. C:\temp>CALL :OMGSUB C:\temp>echo Your mom goes to college. Your mo...
35780460
Batch File and Quoting Variables
11
2016-03-03 18:47:37
<p>I'm working with a batch file and I was wondering, why do some variables have double quotes around them and others don't, for example?</p> <pre><code>SET "keePass=%USERPROFILE%\KeePass\KeePass-2.31\KeePass.exe" </code></pre> <p>but this:</p> <pre><code>SET name="bob" </code></pre> <p>Why the double quotes in the...
8,897
null
2021-07-15 19:08:19
35,785,766
13
2016-03-04 00:23:32
5,047,996
2021-07-15 19:04:31
https://stackoverflow.com/q/35780460
https://stackoverflow.com/a/35785766
<p>...to provide the conclusion at the beginning:</p> <p>Supposing you have got the command extensions enabled (which is the default setting of the Windows command prompt <code>cmd</code>), the best practice is to use the following <code>set</code> syntax:</p> <pre><code>set &quot;VAR=value&quot; </code></pre> <p>(The ...
<p>...to provide the conclusion at the beginning:</p> <p>Supposing you have got the command extensions enabled (which is the default setting of the Windows command prompt <code>cmd</code>), the best practice is to use the following <code>set</code> syntax:</p> <pre><code>set &quot;VAR=value&quot; </code></pre> <p>(The ...
64, 2631, 7002, 9013
batch-file, cmd, environment-variables, windows
<h1>Batch File and Quoting Variables</h1> <p>I'm working with a batch file and I was wondering, why do some variables have double quotes around them and others don't, for example?</p> <pre><code>SET "keePass=%USERPROFILE%\KeePass\KeePass-2.31\KeePass.exe" </code></pre> <p>but this:</p> <pre><code>SET name="bob" </co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,392
cmd
# Batch File and Quoting Variables I'm working with a batch file and I was wondering, why do some variables have double quotes around them and others don't, for example? ``` SET "keePass=%USERPROFILE%\KeePass\KeePass-2.31\KeePass.exe" ``` but this: ``` SET name="bob" ``` Why the double quotes in the first one, but...
...to provide the conclusion at the beginning: Supposing you have got the command extensions enabled (which is the default setting of the Windows command prompt `cmd`), the best practice is to use the following `set` syntax: ``` set "VAR=value" ``` (The command extensions can be enabled/disabled by `cmd` (type `cmd ...
17744981
Check folder is empty using batch command?
11
2013-07-19 11:27:44
<pre><code>for /F %%i in ('dir /b "C:\Program Files\Apache folder\*.*"') do ( echo Folder is NON empty goto launch_app ) </code></pre> <ul> <li><p>How to check a folder is empty?</p> <p>I tried above command, but it didn't work.</p></li> </ul>
35,321
2,583,610
2021-11-23 07:41:17
17,745,340
13
2013-07-19 11:45:28
2,098,699
2013-07-19 12:22:58
https://stackoverflow.com/q/17744981
https://stackoverflow.com/a/17745340
<p>try this:</p> <pre><code>for /F %%i in ('dir /b /a "C:\Program Files\Apache folder\*"') do ( echo if you see this the folder is NOT empty goto launch_app ) </code></pre>
<p>try this:</p> <pre><code>for /F %%i in ('dir /b /a "C:\Program Files\Apache folder\*"') do ( echo if you see this the folder is NOT empty goto launch_app ) </code></pre>
64, 218, 1796, 7002
batch-file, command, directory, windows
<h1>Check folder is empty using batch command?</h1> <pre><code>for /F %%i in ('dir /b "C:\Program Files\Apache folder\*.*"') do ( echo Folder is NON empty goto launch_app ) </code></pre> <ul> <li><p>How to check a folder is empty?</p> <p>I tried above command, but it didn't work.</p></li> </ul>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,395
cmd
# Check folder is empty using batch command? ``` for /F %%i in ('dir /b "C:\Program Files\Apache folder\*.*"') do ( echo Folder is NON empty goto launch_app ) ``` - How to check a folder is empty? I tried above command, but it didn't work.
try this: ``` for /F %%i in ('dir /b /a "C:\Program Files\Apache folder\*"') do ( echo if you see this the folder is NOT empty goto launch_app ) ```
16412040
SQLPLUS command line with Windows batch file
11
2013-05-07 05:49:45
<p>I want to create a batch file which will open the SQLPLUS [CLI] and will execute some stored sql file and will also store the output to text file.</p> <p>So I've created this batch file [which does not work].<br> These SQL file contains SQL which returns the max number from a table.</p> <pre><code>sqlplus scott/ti...
101,906
683,233
2017-05-30 05:36:05
16,467,980
13
2013-05-09 17:51:49
272,864
2013-05-09 17:51:49
https://stackoverflow.com/q/16412040
https://stackoverflow.com/a/16467980
<p>What about native Sql*plus spooling?</p> <p>run.bat:</p> <pre><code>sqlplus hr/hr@sandbox @d:\run.sql </code></pre> <p>run.sql:</p> <pre><code>spool d:\run.log set echo on select * from dual / exit </code></pre> <p>run.log:</p> <pre><code>01:50:20 HR@sandbox&gt; 01:50:20 HR@sandbox&gt; select * from dual 01...
<p>What about native Sql*plus spooling?</p> <p>run.bat:</p> <pre><code>sqlplus hr/hr@sandbox @d:\run.sql </code></pre> <p>run.sql:</p> <pre><code>spool d:\run.log set echo on select * from dual / exit </code></pre> <p>run.log:</p> <pre><code>01:50:20 HR@sandbox&gt; 01:50:20 HR@sandbox&gt; select * from dual 01...
4480, 7002, 19854
batch-file, oracle9i, sqlplus
<h1>SQLPLUS command line with Windows batch file</h1> <p>I want to create a batch file which will open the SQLPLUS [CLI] and will execute some stored sql file and will also store the output to text file.</p> <p>So I've created this batch file [which does not work].<br> These SQL file contains SQL which returns the max...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,396
cmd
# SQLPLUS command line with Windows batch file I want to create a batch file which will open the SQLPLUS [CLI] and will execute some stored sql file and will also store the output to text file. So I've created this batch file [which does not work]. These SQL file contains SQL which returns the max number from a tab...
What about native Sql*plus spooling? run.bat: ``` sqlplus hr/hr@sandbox @d:\run.sql ``` run.sql: ``` spool d:\run.log set echo on select * from dual / exit ``` run.log: ``` 01:50:20 HR@sandbox> 01:50:20 HR@sandbox> select * from dual 01:50:20 2 / D - X Elapsed: 00:00:00.00 01:50:21 HR@sandbox> exit ```
12551842
CMD nested double quotes in argument
11
2012-09-23 11:13:24
<p>I am having problems with passing arguments to a batch function with nested double quotes.</p> <p>Here is an example of a batch file:</p> <pre><code>@SET path_with_space="c:\test\filenamewith space.txt" @CALL :FUNCTION blaat1, "blaat2 %path_with_space%" @GOTO :EOF :FUNCTION @echo off echo arg 1: %~1 echo arg 2: %...
18,087
1,548,942
2017-02-06 18:08:11
12,553,559
13
2012-09-23 15:23:45
463,115
2012-09-24 11:05:40
https://stackoverflow.com/q/12551842
https://stackoverflow.com/a/12553559
<p>Like dbenham said, it's seems impossible to escape a space in a parameter without quotes.<br> But it could be possible if you know how the <em>receiver</em> function gets the parameters.<br> Then you could tranfer the parameter via an escaped delayed variable, the variable will be expanded not in the call, it will b...
<p>Like dbenham said, it's seems impossible to escape a space in a parameter without quotes.<br> But it could be possible if you know how the <em>receiver</em> function gets the parameters.<br> Then you could tranfer the parameter via an escaped delayed variable, the variable will be expanded not in the call, it will b...
2631, 7002, 31134, 63342
batch-file, cmd, command-line-arguments, double-quotes
<h1>CMD nested double quotes in argument</h1> <p>I am having problems with passing arguments to a batch function with nested double quotes.</p> <p>Here is an example of a batch file:</p> <pre><code>@SET path_with_space="c:\test\filenamewith space.txt" @CALL :FUNCTION blaat1, "blaat2 %path_with_space%" @GOTO :EOF :FU...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,397
cmd
# CMD nested double quotes in argument I am having problems with passing arguments to a batch function with nested double quotes. Here is an example of a batch file: ``` @SET path_with_space="c:\test\filenamewith space.txt" @CALL :FUNCTION blaat1, "blaat2 %path_with_space%" @GOTO :EOF :FUNCTION @echo off echo arg 1...
Like dbenham said, it's seems impossible to escape a space in a parameter without quotes. But it could be possible if you know how the *receiver* function gets the parameters. Then you could tranfer the parameter via an escaped delayed variable, the variable will be expanded not in the call, it will be expanded jus...
5675459
How to get Java Version from batch script?
11
2011-04-15 10:34:34
<p>I am trying to get '6' out of the java version output given below</p> <pre><code>java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing) </code></pre> <p>For the same I wrote this batch script</p> <pre><code>set VERSION6="1.6.0_...
14,620
707,414
2022-12-30 18:30:30
5,675,868
13
2011-04-15 11:16:15
7,903
2011-04-15 11:23:55
https://stackoverflow.com/q/5675459
https://stackoverflow.com/a/5675868
<pre><code>@echo off setlocal set VERSION6="1.6.0_21" for /f "tokens=3" %%g in ('java -version 2^&gt;^&amp;1 ^| findstr /i "version"') do ( @echo Output: %%g set JAVAVER=%%g ) set JAVAVER=%JAVAVER:"=% @echo Output: %JAVAVER% for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do ( @echo Major: %%v @echo...
<pre><code>@echo off setlocal set VERSION6="1.6.0_21" for /f "tokens=3" %%g in ('java -version 2^&gt;^&amp;1 ^| findstr /i "version"') do ( @echo Output: %%g set JAVAVER=%%g ) set JAVAVER=%JAVAVER:"=% @echo Output: %JAVAVER% for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do ( @echo Major: %%v @echo...
17, 7002
batch-file, java
<h1>How to get Java Version from batch script?</h1> <p>I am trying to get '6' out of the java version output given below</p> <pre><code>java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing) </code></pre> <p>For the same I wrote th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,399
cmd
# How to get Java Version from batch script? I am trying to get '6' out of the java version output given below ``` java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing) ``` For the same I wrote this batch script ``` set VERSION6...
``` @echo off setlocal set VERSION6="1.6.0_21" for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do ( @echo Output: %%g set JAVAVER=%%g ) set JAVAVER=%JAVAVER:"=% @echo Output: %JAVAVER% for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do ( @echo Major: %%v @echo Minor: %%w ...
62718203
Spring Batch 4.2.4: Unable to deserialize the execution context
10
2020-07-03 15:08:40
<p>I was using <code>spring-batch:4.2.2.RELEASE</code> as part of <code>spring-boot-starter-batch:2.2.4.RELEASE</code>. After upgrading the latter to version <code>2.3.1.RELEASE</code>, I get the following exception when starting a job:</p> <pre><code>java.lang.IllegalArgumentException: Unable to deserialize the execut...
16,481
948,774
2023-05-23 13:20:20
62,753,551
13
2020-07-06 09:55:52
948,774
2020-07-06 09:55:52
https://stackoverflow.com/q/62718203
https://stackoverflow.com/a/62753551
<p>Thanks to @MahmoudBenHassine for pointing me in the direction of the fix:</p> <p>My attempt to manually add the type information to the database values was correct, but I didn't take it far enough.</p> <p>There are 2 tables, whose values that needed updating:</p> <ul> <li>table <code>batch_job_execution_context</cod...
<p>Thanks to @MahmoudBenHassine for pointing me in the direction of the fix:</p> <p>My attempt to manually add the type information to the database values was correct, but I didn't take it far enough.</p> <p>There are 2 tables, whose values that needed updating:</p> <ul> <li>table <code>batch_job_execution_context</cod...
17, 1211, 41895, 75599, 95875
java, kotlin, spring, spring-batch, spring-boot
<h1>Spring Batch 4.2.4: Unable to deserialize the execution context</h1> <p>I was using <code>spring-batch:4.2.2.RELEASE</code> as part of <code>spring-boot-starter-batch:2.2.4.RELEASE</code>. After upgrading the latter to version <code>2.3.1.RELEASE</code>, I get the following exception when starting a job:</p> <pre><...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,400
cmd
# Spring Batch 4.2.4: Unable to deserialize the execution context I was using `spring-batch:4.2.2.RELEASE` as part of `spring-boot-starter-batch:2.2.4.RELEASE`. After upgrading the latter to version `2.3.1.RELEASE`, I get the following exception when starting a job: ``` java.lang.IllegalArgumentException: Unable to d...
Thanks to @MahmoudBenHassine for pointing me in the direction of the fix: My attempt to manually add the type information to the database values was correct, but I didn't take it far enough. There are 2 tables, whose values that needed updating: - table `batch_job_execution_context`, column `short_context` - table `...
51525871
URL could not be accessed: HTTP/1.1 400 Bad URI
10
2018-07-25 18:54:18
<p>I want to create a new laravel project via composer and I have got this error</p> <pre><code> [Composer\Downloader\TransportException] The 'http://packagist.org/p/fideloper/proxy%249271e19129358853986ed3ca9315ced11a42439a57f49537033c3b436a6ff543.json ' URL could not be accessed: HTTP/1.1 400 Bad URI </code></pr...
11,033
10,079,650
2022-01-07 22:37:57
51,525,980
13
2018-07-25 19:03:31
1,206,267
2022-01-07 22:37:57
https://stackoverflow.com/q/51525871
https://stackoverflow.com/a/51525980
<p>This question gets asked pretty frequently either here, github, or elsewhere. I'd almost say that this should be a community wiki entry. I've ran into this problem myself, as well, and here's a list of things to inspect and ensure they're not the cause (good chance one of them is the cause):</p> <p>(Also, run <code>...
<p>This question gets asked pretty frequently either here, github, or elsewhere. I'd almost say that this should be a community wiki entry. I've ran into this problem myself, as well, and here's a list of things to inspect and ensure they're not the cause (good chance one of them is the cause):</p> <p>(Also, run <code>...
5, 2631, 75151, 78546
cmd, composer-php, laravel, php
<h1>URL could not be accessed: HTTP/1.1 400 Bad URI</h1> <p>I want to create a new laravel project via composer and I have got this error</p> <pre><code> [Composer\Downloader\TransportException] The 'http://packagist.org/p/fideloper/proxy%249271e19129358853986ed3ca9315ced11a42439a57f49537033c3b436a6ff543.json ' UR...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,401
cmd
# URL could not be accessed: HTTP/1.1 400 Bad URI I want to create a new laravel project via composer and I have got this error ``` [Composer\Downloader\TransportException] The 'http://packagist.org/p/fideloper/proxy%249271e19129358853986ed3ca9315ced11a42439a57f49537033c3b436a6ff543.json ' URL could not be acces...
This question gets asked pretty frequently either here, github, or elsewhere. I'd almost say that this should be a community wiki entry. I've ran into this problem myself, as well, and here's a list of things to inspect and ensure they're not the cause (good chance one of them is the cause): (Also, run `composer diagn...
36480837
Concatenating strings and variables in batch
10
2016-04-07 15:32:34
<p>I would like to create a dynamic file path in <code>.bat</code> file. At the moment the file path looks like this:</p> <pre><code>"C:\FolderA\FolderB\FileA.xlsx" </code></pre> <p>I would like to incorporate today's date in the file name to produce something like that:</p> <pre><code>/exp:"C:\FolderA\FolderB\FileA...
70,100
2,830,928
2023-06-01 18:57:06
36,481,664
13
2016-04-07 16:08:59
2,152,082
2016-04-07 16:08:59
https://stackoverflow.com/q/36480837
https://stackoverflow.com/a/36481664
<p>?</p> <pre><code>/exp:"C:\FolderA\FolderB\FileA "&amp;%Mydate%&amp;".xlsx" /T </code></pre> <p>? </p> <p>This is not <code>cmd</code> syntax. To set a variable, use the <code>set</code> command. Also to concatenate, you don't have (read: must not) use something like concatenation symbols:</p> <pre><code>set "var...
<p>?</p> <pre><code>/exp:"C:\FolderA\FolderB\FileA "&amp;%Mydate%&amp;".xlsx" /T </code></pre> <p>? </p> <p>This is not <code>cmd</code> syntax. To set a variable, use the <code>set</code> command. Also to concatenate, you don't have (read: must not) use something like concatenation symbols:</p> <pre><code>set "var...
64, 2631, 7002, 7792
batch-file, cmd, string-concatenation, windows
<h1>Concatenating strings and variables in batch</h1> <p>I would like to create a dynamic file path in <code>.bat</code> file. At the moment the file path looks like this:</p> <pre><code>"C:\FolderA\FolderB\FileA.xlsx" </code></pre> <p>I would like to incorporate today's date in the file name to produce something lik...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,402
cmd
# Concatenating strings and variables in batch I would like to create a dynamic file path in `.bat` file. At the moment the file path looks like this: ``` "C:\FolderA\FolderB\FileA.xlsx" ``` I would like to incorporate today's date in the file name to produce something like that: ``` /exp:"C:\FolderA\FolderB\FileA ...
? ``` /exp:"C:\FolderA\FolderB\FileA "&%Mydate%&".xlsx" /T ``` ? This is not `cmd` syntax. To set a variable, use the `set` command. Also to concatenate, you don't have (read: must not) use something like concatenation symbols: ``` set "var=C:\FolderA\FolderB\FileA %Mydate%.xlsx" ``` (whatever `/exp:` or `/t` is s...
21916913
How I get the position of a character from a string in batch
10
2014-02-20 18:51:30
<p>I have a result string saved in a variable <code>RES</code>, this result is something like <code>2.3/5.0</code> I would like to get the part before the "<code>/</code>" and sending it to the batch output through an <code>ECHO</code> command. I have been searching how can I do this using batch commands, but only gett...
31,443
1,507,252
2016-06-09 17:00:38
21,917,199
13
2014-02-20 19:06:09
2,083,907
2014-02-20 19:06:09
https://stackoverflow.com/q/21916913
https://stackoverflow.com/a/21917199
<p>If you really want the position itself, you can apply the strlen function from <a href="https://stackoverflow.com/questions/5837418/how-do-you-get-the-string-length-in-a-batch-file">How do you get the string length in a batch file?</a> to the result below, but if you just want that prefix, you can simply do:</p> <p...
<p>If you really want the position itself, you can apply the strlen function from <a href="https://stackoverflow.com/questions/5837418/how-do-you-get-the-string-length-in-a-batch-file">How do you get the string length in a batch file?</a> to the result below, but if you just want that prefix, you can simply do:</p> <p...
1231, 2631, 7002
batch-file, cmd, command-line
<h1>How I get the position of a character from a string in batch</h1> <p>I have a result string saved in a variable <code>RES</code>, this result is something like <code>2.3/5.0</code> I would like to get the part before the "<code>/</code>" and sending it to the batch output through an <code>ECHO</code> command. I hav...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,403
cmd
# How I get the position of a character from a string in batch I have a result string saved in a variable `RES`, this result is something like `2.3/5.0` I would like to get the part before the "`/`" and sending it to the batch output through an `ECHO` command. I have been searching how can I do this using batch comman...
If you really want the position itself, you can apply the strlen function from [How do you get the string length in a batch file?](https://stackoverflow.com/questions/5837418/how-do-you-get-the-string-length-in-a-batch-file) to the result below, but if you just want that prefix, you can simply do: ``` set "res=2.3/5.0...
20698394
Can you fork in Windows batch file?
10
2013-12-20 07:24:58
<p>I want to start two programs from the batch file, (also batch files) - they will execute few seconds. Then in the main batch file I want to wait while both are finished and then continue main execution. Is that possible at all?</p>
18,852
1,968,972
2013-12-20 07:36:51
20,698,549
13
2013-12-20 07:36:51
73,070
2013-12-20 07:36:51
https://stackoverflow.com/q/20698394
https://stackoverflow.com/a/20698549
<p>You can, sort of:</p> <pre><code>@echo off set Token=MAIN_%RANDOM%_%CD% start "%Token%_1" cmd /c child1.cmd start "%Token%_2" cmd /c child2.cmd :loop ping -n 2 localhost &gt;nul 2&gt;nul tasklist /fi "WINDOWTITLE eq %Token%_1" | findstr "cmd" &gt;nul 2&gt;nul &amp;&amp; set Child1=1 || set Child1= tasklist /fi "WIN...
<p>You can, sort of:</p> <pre><code>@echo off set Token=MAIN_%RANDOM%_%CD% start "%Token%_1" cmd /c child1.cmd start "%Token%_2" cmd /c child2.cmd :loop ping -n 2 localhost &gt;nul 2&gt;nul tasklist /fi "WINDOWTITLE eq %Token%_1" | findstr "cmd" &gt;nul 2&gt;nul &amp;&amp; set Child1=1 || set Child1= tasklist /fi "WIN...
2631, 7002
batch-file, cmd
<h1>Can you fork in Windows batch file?</h1> <p>I want to start two programs from the batch file, (also batch files) - they will execute few seconds. Then in the main batch file I want to wait while both are finished and then continue main execution. Is that possible at all?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,404
cmd
# Can you fork in Windows batch file? I want to start two programs from the batch file, (also batch files) - they will execute few seconds. Then in the main batch file I want to wait while both are finished and then continue main execution. Is that possible at all?
You can, sort of: ``` @echo off set Token=MAIN_%RANDOM%_%CD% start "%Token%_1" cmd /c child1.cmd start "%Token%_2" cmd /c child2.cmd :loop ping -n 2 localhost >nul 2>nul tasklist /fi "WINDOWTITLE eq %Token%_1" | findstr "cmd" >nul 2>nul && set Child1=1 || set Child1= tasklist /fi "WINDOWTITLE eq %Token%_2" | findstr "...
271311
Batch scripting documentation
10
2008-11-07 05:31:32
<p>Is there some nice documentation for Windows batch scripting I can download and refer to while offline?</p>
23,072
14,966
2018-01-18 01:13:17
2,035,347
13
2010-01-09 23:16:21
63,550
2010-01-10 17:34:16
https://stackoverflow.com/q/271311
https://stackoverflow.com/a/2035347
<p>I can recommend:</p> <blockquote> <p><a href="http://ss64.com/nt/" rel="noreferrer">An A-Z Index of the Windows XP command line</a>. </p> </blockquote> <p>It is more thorough than <code>help</code> and most importantly it provides several examples for each command. Example: <a href="http://ss64.com/nt/find.html"...
<p>I can recommend:</p> <blockquote> <p><a href="http://ss64.com/nt/" rel="noreferrer">An A-Z Index of the Windows XP command line</a>. </p> </blockquote> <p>It is more thorough than <code>help</code> and most importantly it provides several examples for each command. Example: <a href="http://ss64.com/nt/find.html"...
271, 531, 7002
batch-file, documentation, scripting
<h1>Batch scripting documentation</h1> <p>Is there some nice documentation for Windows batch scripting I can download and refer to while offline?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,405
cmd
# Batch scripting documentation Is there some nice documentation for Windows batch scripting I can download and refer to while offline?
I can recommend: > [An A-Z Index of the Windows XP command line](http://ss64.com/nt/). It is more thorough than `help` and most importantly it provides several examples for each command. Example: [FIND](http://ss64.com/nt/find.html). There are also cross-references to other commands. For offline reading you can capt...
560967
How to stop batch script on del failure
10
2009-02-18 13:02:51
<p>We have a batch script that removes files (<code>del</code>) and directories (<code>rd</code>). Does anyone know how to halt (fail) execution of the script if any of these delete statements fail? They could fail if a file/directory is locked by Windows. Thanks.</p> <p><strong>Update</strong></p> <p>Statements I...
25,961
47,281
2018-11-12 16:49:40
561,849
13
2009-02-18 16:34:59
7,903
2014-04-14 21:50:24
https://stackoverflow.com/q/560967
https://stackoverflow.com/a/561849
<p>For deleting the files, you can first try to <code>ren</code> (rename) the file. <code>ren</code> will set ERRORLEVEL to 1 if the file is locked. Add quotes around filename.</p> <pre><code>@echo OFF :: Delete all files, but exit if a file is locked. for %%F in (*.*) do ( @echo Deleting %%F ren "%%F" tmp 2&...
<p>For deleting the files, you can first try to <code>ren</code> (rename) the file. <code>ren</code> will set ERRORLEVEL to 1 if the file is locked. Add quotes around filename.</p> <pre><code>@echo OFF :: Delete all files, but exit if a file is locked. for %%F in (*.*) do ( @echo Deleting %%F ren "%%F" tmp 2&...
7002
batch-file
<h1>How to stop batch script on del failure</h1> <p>We have a batch script that removes files (<code>del</code>) and directories (<code>rd</code>). Does anyone know how to halt (fail) execution of the script if any of these delete statements fail? They could fail if a file/directory is locked by Windows. Thanks.</p>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,406
cmd
# How to stop batch script on del failure We have a batch script that removes files (`del`) and directories (`rd`). Does anyone know how to halt (fail) execution of the script if any of these delete statements fail? They could fail if a file/directory is locked by Windows. Thanks. **Update** Statements I'm using: D...
For deleting the files, you can first try to `ren` (rename) the file. `ren` will set ERRORLEVEL to 1 if the file is locked. Add quotes around filename. ``` @echo OFF :: Delete all files, but exit if a file is locked. for %%F in (*.*) do ( @echo Deleting %%F ren "%%F" tmp 2> nul if ERRORLEVEL 1 ( @...
34103871
Batch : Dynamic variable name (eval equivalent)
9
2015-12-05 10:39:17
<p>I have a variable containing the name of an environnent variable. I would like to eval this value. For example:</p> <pre><code>:: TOTO_1_2 defined outside of batch file set varName="TOTO_1_2" echo %TOTO_1_2% :: Display env var echo %%varName%% :: Broken </code></pre> <p>The idea is to pass the value of the env var...
10,418
4,256,397
2015-12-05 11:09:37
34,104,130
13
2015-12-05 11:09:37
2,152,082
2015-12-05 11:09:37
https://stackoverflow.com/q/34103871
https://stackoverflow.com/a/34104130
<p>if you want to evaluate a evaluated variable, you have to parse it twice:</p> <p>There are different possibilities to do that. Here are three of them:</p> <pre><code>@echo off SET TOTO_1_2=hello set "varName=TOTO_1_2" echo 0: %TOTO_1_2% call echo 1: %%%varName%%% setlocal enabledelayedexpansion for %%i in (%varn...
<p>if you want to evaluate a evaluated variable, you have to parse it twice:</p> <p>There are different possibilities to do that. Here are three of them:</p> <pre><code>@echo off SET TOTO_1_2=hello set "varName=TOTO_1_2" echo 0: %TOTO_1_2% call echo 1: %%%varName%%% setlocal enabledelayedexpansion for %%i in (%varn...
64, 2631, 7002
batch-file, cmd, windows
<h1>Batch : Dynamic variable name (eval equivalent)</h1> <p>I have a variable containing the name of an environnent variable. I would like to eval this value. For example:</p> <pre><code>:: TOTO_1_2 defined outside of batch file set varName="TOTO_1_2" echo %TOTO_1_2% :: Display env var echo %%varName%% :: Broken </cod...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,408
cmd
# Batch : Dynamic variable name (eval equivalent) I have a variable containing the name of an environnent variable. I would like to eval this value. For example: ``` :: TOTO_1_2 defined outside of batch file set varName="TOTO_1_2" echo %TOTO_1_2% :: Display env var echo %%varName%% :: Broken ``` The idea is to pass ...
if you want to evaluate a evaluated variable, you have to parse it twice: There are different possibilities to do that. Here are three of them: ``` @echo off SET TOTO_1_2=hello set "varName=TOTO_1_2" echo 0: %TOTO_1_2% call echo 1: %%%varName%%% setlocal enabledelayedexpansion for %%i in (%varname%) do echo 2: !%%i...
28719836
Spring Batch: problems (mix data) when converting to multithread
9
2015-02-25 13:07:55
<p>Maybe this is a recurrent question, but I need some customization with my context.</p> <p>I'm using Spring Batch 3.0.1.RELEASE</p> <p>I have a simple job with some steps. One step is a chunk like this:</p> <pre><code> &lt;tasklet transaction-manager="myTransactionManager"&gt; &lt;batch:chunk reader="myReader" ...
19,554
543,320
2015-02-26 17:08:03
28,724,199
13
2015-02-25 16:23:09
618,059
2015-02-25 16:23:09
https://stackoverflow.com/q/28719836
https://stackoverflow.com/a/28724199
<p>You have asked a lot in your question (in the future, please break this type of question up into multiple, more specific questions). However, item by item:</p> <p><strong>Is <code>JdbcCursorItemReader</code> thread-safe?</strong><br> As the <a href="http://docs.spring.io/spring-batch/trunk/apidocs/org/springframew...
<p>You have asked a lot in your question (in the future, please break this type of question up into multiple, more specific questions). However, item by item:</p> <p><strong>Is <code>JdbcCursorItemReader</code> thread-safe?</strong><br> As the <a href="http://docs.spring.io/spring-batch/trunk/apidocs/org/springframew...
353, 1211, 1381, 13829, 41895
multithreading, parallel-processing, spring, spring-batch, thread-safety
<h1>Spring Batch: problems (mix data) when converting to multithread</h1> <p>Maybe this is a recurrent question, but I need some customization with my context.</p> <p>I'm using Spring Batch 3.0.1.RELEASE</p> <p>I have a simple job with some steps. One step is a chunk like this:</p> <pre><code> &lt;tasklet transac...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,409
cmd
# Spring Batch: problems (mix data) when converting to multithread Maybe this is a recurrent question, but I need some customization with my context. I'm using Spring Batch 3.0.1.RELEASE I have a simple job with some steps. One step is a chunk like this: ``` <tasklet transaction-manager="myTransactionManager"> ...
You have asked a lot in your question (in the future, please break this type of question up into multiple, more specific questions). However, item by item: **Is `JdbcCursorItemReader` thread-safe?** As the [documentation states](http://docs.spring.io/spring-batch/trunk/apidocs/org/springframework/batch/item/database...
25596171
Merge multiple csv files using batch file
9
2014-08-31 20:47:38
<p>Is it possible to merge multiple CSV files [same directory] into one using a batch file? If so, how can I do this?</p> <p>I think that would apply to any ASCII file?</p>
43,902
2,751,829
2020-10-04 00:05:16
25,596,223
13
2014-08-31 20:55:03
3,961,759
2014-08-31 21:13:37
https://stackoverflow.com/q/25596171
https://stackoverflow.com/a/25596223
<pre><code>copy *.csv merged.csv </code></pre> <p>or </p> <pre><code>copy file1+file2+… merged.csv </code></pre> <p>for a more sophisticated script that avoids duplicate headers, see <a href="https://stackoverflow.com/questions/12745623/batch-combine-csv-remove-header">Batch Combine CSV Remove Header</a></p>
<pre><code>copy *.csv merged.csv </code></pre> <p>or </p> <pre><code>copy file1+file2+… merged.csv </code></pre> <p>for a more sophisticated script that avoids duplicate headers, see <a href="https://stackoverflow.com/questions/12745623/batch-combine-csv-remove-header">Batch Combine CSV Remove Header</a></p>
5370, 7002
batch-file, dos
<h1>Merge multiple csv files using batch file</h1> <p>Is it possible to merge multiple CSV files [same directory] into one using a batch file? If so, how can I do this?</p> <p>I think that would apply to any ASCII file?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,410
cmd
# Merge multiple csv files using batch file Is it possible to merge multiple CSV files [same directory] into one using a batch file? If so, how can I do this? I think that would apply to any ASCII file?
``` copy *.csv merged.csv ``` or ``` copy file1+file2+… merged.csv ``` for a more sophisticated script that avoids duplicate headers, see [Batch Combine CSV Remove Header](https://stackoverflow.com/questions/12745623/batch-combine-csv-remove-header)
16119257
Retrieving serial id from batch inserted rows in postgresql
9
2013-04-20 10:25:53
<p>Here is the code that works:</p> <pre><code> Connection c = ds.getConnection(); c.setAutoCommit(false); PreparedStatement stmt = c.prepareStatement("INSERT INTO items (name, description) VALUES(?, ?)"); while (!(items = bus.take()).isEmpty()) { for (Item item : items) { ...
10,090
80,002
2020-12-09 10:20:58
16,119,489
13
2013-04-20 10:52:47
null
2017-09-06 19:42:35
https://stackoverflow.com/q/16119257
https://stackoverflow.com/a/16119489
<p>Something like this should work:</p> <pre><code>// tell the driver you want the generated keys stmt = c.prepareStatement("INSERT ... ", Statement.RETURN_GENERATED_KEYS); stmt.executeBatch(); // now retrieve the generated keys ResultSet rs = stmt.getGeneratedKeys(); while (rs.next()) { int id = rs.getInt(1); .....
<p>Something like this should work:</p> <pre><code>// tell the driver you want the generated keys stmt = c.prepareStatement("INSERT ... ", Statement.RETURN_GENERATED_KEYS); stmt.executeBatch(); // now retrieve the generated keys ResultSet rs = stmt.getGeneratedKeys(); while (rs.next()) { int id = rs.getInt(1); .....
17, 256, 5617, 7002
batch-file, java, jdbc, postgresql
<h1>Retrieving serial id from batch inserted rows in postgresql</h1> <p>Here is the code that works:</p> <pre><code> Connection c = ds.getConnection(); c.setAutoCommit(false); PreparedStatement stmt = c.prepareStatement("INSERT INTO items (name, description) VALUES(?, ?)"); while (!(item...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,411
cmd
# Retrieving serial id from batch inserted rows in postgresql Here is the code that works: ``` Connection c = ds.getConnection(); c.setAutoCommit(false); PreparedStatement stmt = c.prepareStatement("INSERT INTO items (name, description) VALUES(?, ?)"); while (!(items = bus.take()).isEm...
Something like this should work: ``` // tell the driver you want the generated keys stmt = c.prepareStatement("INSERT ... ", Statement.RETURN_GENERATED_KEYS); stmt.executeBatch(); // now retrieve the generated keys ResultSet rs = stmt.getGeneratedKeys(); while (rs.next()) { int id = rs.getInt(1); .. save the id s...
15478002
How do I call concat : %variable% when the variable has internal spaces?
9
2013-03-18 13:27:08
<p>I am trying to concat variables in my class path using the following command, but it isn't working when the folder name contains spaces:</p> <pre><code>call concat : %variable% </code></pre> <p>where <code>%variable% ={folder name containing space}</code></p> <p>I tried putting quotes:</p> <pre><code>call concat...
20,375
479,020
2017-03-28 20:57:38
15,480,012
13
2013-03-18 15:02:48
2,098,699
2013-03-18 15:02:48
https://stackoverflow.com/q/15478002
https://stackoverflow.com/a/15480012
<p>Do not use additional double quotes for strings with spaces. The parameter <code>%~</code> removes all pairs of double quotes around the string:</p> <pre><code>@echo off &amp;setlocal set "Variable="my var"" echo Variable: %Variable% call :concat %Variable% goto :eof :concat echo concat %%1: %1 set "NewVar=%~1...
<p>Do not use additional double quotes for strings with spaces. The parameter <code>%~</code> removes all pairs of double quotes around the string:</p> <pre><code>@echo off &amp;setlocal set "Variable="my var"" echo Variable: %Variable% call :concat %Variable% goto :eof :concat echo concat %%1: %1 set "NewVar=%~1...
2631, 7002
batch-file, cmd
<h1>How do I call concat : %variable% when the variable has internal spaces?</h1> <p>I am trying to concat variables in my class path using the following command, but it isn't working when the folder name contains spaces:</p> <pre><code>call concat : %variable% </code></pre> <p>where <code>%variable% ={folder name co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,412
cmd
# How do I call concat : %variable% when the variable has internal spaces? I am trying to concat variables in my class path using the following command, but it isn't working when the folder name contains spaces: ``` call concat : %variable% ``` where `%variable% ={folder name containing space}` I tried putting quot...
Do not use additional double quotes for strings with spaces. The parameter `%~` removes all pairs of double quotes around the string: ``` @echo off &setlocal set "Variable="my var"" echo Variable: %Variable% call :concat %Variable% goto :eof :concat echo concat %%1: %1 set "NewVar=%~1" echo concat NewVar: %newvar...
888264
Testing for file attribute in batch file
9
2009-05-20 14:27:47
<p>I'm writing a batch file and I need to know if a file is read only. How can I do that ?</p> <p>I know how to get them using the %~a modifier but I don't know what to do with this output. It gives something like -ra------. How can I parse this in batch file ?</p>
11,827
109,960
2017-01-25 12:31:43
888,385
13
2009-05-20 14:46:28
7,903
2009-05-21 11:42:55
https://stackoverflow.com/q/888264
https://stackoverflow.com/a/888385
<p>Something like this should work:</p> <pre><code>@echo OFF SETLOCAL enableextensions enabledelayedexpansion set INPUT=test* for %%F in (%INPUT%) do ( set ATTRIBS=%%~aF set CURR_FILE=%%~nxF set READ_ATTRIB=!ATTRIBS:~1,1! @echo File: !CURR_FILE! @echo Attributes: !ATTRIBS! @echo Read attrib...
<p>Something like this should work:</p> <pre><code>@echo OFF SETLOCAL enableextensions enabledelayedexpansion set INPUT=test* for %%F in (%INPUT%) do ( set ATTRIBS=%%~aF set CURR_FILE=%%~nxF set READ_ATTRIB=!ATTRIBS:~1,1! @echo File: !CURR_FILE! @echo Attributes: !ATTRIBS! @echo Read attrib...
7002, 31810
batch-file, file-attributes
<h1>Testing for file attribute in batch file</h1> <p>I'm writing a batch file and I need to know if a file is read only. How can I do that ?</p> <p>I know how to get them using the %~a modifier but I don't know what to do with this output. It gives something like -ra------. How can I parse this in batch file ?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,413
cmd
# Testing for file attribute in batch file I'm writing a batch file and I need to know if a file is read only. How can I do that ? I know how to get them using the %~a modifier but I don't know what to do with this output. It gives something like -ra------. How can I parse this in batch file ?
Something like this should work: ``` @echo OFF SETLOCAL enableextensions enabledelayedexpansion set INPUT=test* for %%F in (%INPUT%) do ( set ATTRIBS=%%~aF set CURR_FILE=%%~nxF set READ_ATTRIB=!ATTRIBS:~1,1! @echo File: !CURR_FILE! @echo Attributes: !ATTRIBS! @echo Read attribute set to: !R...
43161349
How to autostart windows service after install by sc?
8
2017-04-01 19:56:25
<p>I created a batch file for installing service because I need to install my service on PC don't have Visual Studio.</p> <p>Content of batch file:</p> <pre><code>@echo OFF echo Installing service... sc create "MyService" binpath= %~dp0\MyService.exe start= auto echo Installing service complete pause </code></pre> <...
29,639
4,963,587
2018-08-12 21:28:09
43,161,423
13
2017-04-01 20:03:23
5,269,570
2017-04-01 20:03:23
https://stackoverflow.com/q/43161349
https://stackoverflow.com/a/43161423
<p>This is possible by using either the <code>net start service</code> or <code>sc start</code> command (<a href="https://superuser.com/questions/315166/net-start-service-and-sc-start-what-is-the-difference">see previous question on that</a>). </p> <p><strong>To start a service using <code>sc start</code>, the syntax...
<p>This is possible by using either the <code>net start service</code> or <code>sc start</code> command (<a href="https://superuser.com/questions/315166/net-start-service-and-sc-start-what-is-the-difference">see previous question on that</a>). </p> <p><strong>To start a service using <code>sc start</code>, the syntax...
2596, 7002, 8914
autostart, batch-file, windows-services
<h1>How to autostart windows service after install by sc?</h1> <p>I created a batch file for installing service because I need to install my service on PC don't have Visual Studio.</p> <p>Content of batch file:</p> <pre><code>@echo OFF echo Installing service... sc create "MyService" binpath= %~dp0\MyService.exe star...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,414
cmd
# How to autostart windows service after install by sc? I created a batch file for installing service because I need to install my service on PC don't have Visual Studio. Content of batch file: ``` @echo OFF echo Installing service... sc create "MyService" binpath= %~dp0\MyService.exe start= auto echo Installing ser...
This is possible by using either the `net start service` or `sc start` command ([see previous question on that](https://superuser.com/questions/315166/net-start-service-and-sc-start-what-is-the-difference)). **To start a service using `sc start`, the syntax is:** ``` sc [<ServerName>] start <ServiceName> [<ServiceArg...
42353108
Activate virtual environement and start jupyter notebook all in batch file
8
2017-02-20 19:51:04
<p>I created the following batch file: <code>jupyter_nn.bat</code>. Inside file I have:</p> <pre><code>cd "C:\My_favorite_path" activate neuralnets jupyter notebook </code></pre> <p>So the goal is to activate conda virtual environment and start jupyter notebook. For some reason this does not work. Window immediately...
5,090
1,700,890
2017-02-20 20:49:19
42,353,943
13
2017-02-20 20:49:19
2,449,192
2017-02-20 20:49:19
https://stackoverflow.com/q/42353108
https://stackoverflow.com/a/42353943
<p>You need to add <code>CALL</code> before the activate. Since <code>activate</code> is another batch script, unless you <code>CALL</code> it, the whole process will exit. See here for more explanation: <a href="https://stackoverflow.com/q/1103994/2449192">How to run multiple .BAT files within a .BAT file</a></p> <pr...
<p>You need to add <code>CALL</code> before the activate. Since <code>activate</code> is another batch script, unless you <code>CALL</code> it, the whole process will exit. See here for more explanation: <a href="https://stackoverflow.com/q/1103994/2449192">How to run multiple .BAT files within a .BAT file</a></p> <pr...
16, 64, 2631, 96537, 116342
cmd, conda, jupyter-notebook, python, windows
<h1>Activate virtual environement and start jupyter notebook all in batch file</h1> <p>I created the following batch file: <code>jupyter_nn.bat</code>. Inside file I have:</p> <pre><code>cd "C:\My_favorite_path" activate neuralnets jupyter notebook </code></pre> <p>So the goal is to activate conda virtual environmen...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,415
cmd
# Activate virtual environement and start jupyter notebook all in batch file I created the following batch file: `jupyter_nn.bat`. Inside file I have: ``` cd "C:\My_favorite_path" activate neuralnets jupyter notebook ``` So the goal is to activate conda virtual environment and start jupyter notebook. For some reason...
You need to add `CALL` before the activate. Since `activate` is another batch script, unless you `CALL` it, the whole process will exit. See here for more explanation: [How to run multiple .BAT files within a .BAT file](https://stackoverflow.com/q/1103994/2449192) ``` cd "C:\My_favorite_path" CALL activate neuralnets ...
28692172
How to automate "run asp.net website" from command line?
8
2015-02-24 09:31:50
<p>Right now, I do the following manual steps to run an ASP.NET website on my PC:</p> <ol> <li>Open Visual Studio and the project inside it</li> <li>Press Ctrl+F5 which: <ol> <li>Builds the solution</li> <li>Runs IIS express</li> <li>Opens a browser</li> </ol></li> </ol> <p>How to write a batch file that does the sam...
4,089
21,728
2015-02-24 21:55:15
28,692,723
13
2015-02-24 09:57:51
1,833,612
2015-02-24 13:41:55
https://stackoverflow.com/q/28692172
https://stackoverflow.com/a/28692723
<p>From the visual studio command line you could do the following:</p> <pre><code>devenv "C:\path\FooSolution.sln" /run </code></pre> <p><a href="https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx" rel="noreferrer"><strong>MSDN Devenv Command Line Switches Reference</strong></a></p> <p>Wrapping this all up into ...
<p>From the visual studio command line you could do the following:</p> <pre><code>devenv "C:\path\FooSolution.sln" /run </code></pre> <p><a href="https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx" rel="noreferrer"><strong>MSDN Devenv Command Line Switches Reference</strong></a></p> <p>Wrapping this all up into ...
96, 215, 7002, 33953, 59414
asp.net, batch-file, iis, iis-express, visual-studio
<h1>How to automate "run asp.net website" from command line?</h1> <p>Right now, I do the following manual steps to run an ASP.NET website on my PC:</p> <ol> <li>Open Visual Studio and the project inside it</li> <li>Press Ctrl+F5 which: <ol> <li>Builds the solution</li> <li>Runs IIS express</li> <li>Opens a browser</li...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,416
cmd
# How to automate "run asp.net website" from command line? Right now, I do the following manual steps to run an ASP.NET website on my PC: 1. Open Visual Studio and the project inside it 2. Press Ctrl+F5 which: 1. Builds the solution 2. Runs IIS express 3. Opens a browser How to write a batch file that does ...
From the visual studio command line you could do the following: ``` devenv "C:\path\FooSolution.sln" /run ``` [**MSDN Devenv Command Line Switches Reference**](https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx) Wrapping this all up into a batch file (assuming VS 2012) it would become: ``` call "C:\Program File...
25498773
Batch posting on blogger using gdata python client
8
2014-08-26 05:37:32
<p>I'm trying to copy all my Livejournal posts to my new blog on blogger.com. I do so by using slightly modified <a href="https://code.google.com/p/gdata-python-client/source/browse/samples/blogger/BloggerExampleV1.py">example</a> that ships with the <a href="https://code.google.com/p/gdata-python-client/">gdata python...
1,883
1,231,940
2020-11-20 16:50:45
25,639,768
13
2014-09-03 08:34:56
933,980
2017-05-02 11:06:20
https://stackoverflow.com/q/25498773
https://stackoverflow.com/a/25639768
<p>I would recommend using Google Blog converters instead ( <a href="https://code.google.com/archive/p/google-blog-converters-appengine/" rel="nofollow noreferrer">https://code.google.com/archive/p/google-blog-converters-appengine/</a> ) </p> <p>To get started you will have to go through </p> <p><a href="https://gith...
<p>I would recommend using Google Blog converters instead ( <a href="https://code.google.com/archive/p/google-blog-converters-appengine/" rel="nofollow noreferrer">https://code.google.com/archive/p/google-blog-converters-appengine/</a> ) </p> <p>To get started you will have to go through </p> <p><a href="https://gith...
16, 3714, 30645, 57630
batch-processing, blogger, gdata-python-client, python
<h1>Batch posting on blogger using gdata python client</h1> <p>I'm trying to copy all my Livejournal posts to my new blog on blogger.com. I do so by using slightly modified <a href="https://code.google.com/p/gdata-python-client/source/browse/samples/blogger/BloggerExampleV1.py">example</a> that ships with the <a href="...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%cmd%' OR '%batch%'; a.Body contains code block; q.Score > 5; a.Score > 10
13,417
cmd
# Batch posting on blogger using gdata python client I'm trying to copy all my Livejournal posts to my new blog on blogger.com. I do so by using slightly modified [example](https://code.google.com/p/gdata-python-client/source/browse/samples/blogger/BloggerExampleV1.py) that ships with the [gdata python client](https:/...
I would recommend using Google Blog converters instead ( <https://code.google.com/archive/p/google-blog-converters-appengine/> ) To get started you will have to go through <https://github.com/google/gdata-python-client/blob/master/INSTALL.txt> - Steps for setting up Google GData API <https://github.com/pra85/google-b...