batch-processing

Batch File > Javascript > WinSCP > Check if file exists

醉酒当歌 提交于 2019-12-01 13:41:38
I have a batch file that will launch a .js file which, via WinSCP, checks if a file exists and returns to the batch file if it does or not. The problem IS: It always returns not found, and I cannot figure out why. I am unsure how to use a wildcard in this scenario. The batch file looks like this: cscript /nologo file.js if errorlevel 1 goto notfound exit :notfound (another script to copy a file over) Only one file can exist on the server at once. So every ten min, this batch file will run, check if there is a file, if not, copy one over. The file.js: // Configuration // Remote file search for

Colon in batch variable name

别来无恙 提交于 2019-12-01 12:49:09
I have a batch script which should have access to a variable named something like env:dev , so it has a colon inside... this variable is set by a third-party component, so I don't have influence on that naming... How can I access the content of this variable in my batch script? I know that : is a special character, so can I perhaps escape it? The following doesn't work: echo %env:dev% echo "%env:dev%" echo %env^:dev% ... Any suggestions? A : colon has special meaning in CMD environment variables if command extensions are enabled (Windows cmd default), for instance Variable Edit/Replace :

How to do select the data in batches using hibernate?

牧云@^-^@ 提交于 2019-12-01 12:46:51
I have a function which basically returns the entire data from the table.How can i implement batch fetching so that the data will be returned in batches of 60,000 rows at a time. Will the following logic applicable in this scenario? http://javainnovations.blogspot.com/2008/07/batch-insertion-in-hibernate.html user950415 In hibernate.properties , set the batch size using the parameter hibernate.jdbc.batch_size= 'your_value' To select data in a batch, you can apply data pagination by setting the initial position & the number of results to be fetched for a query. for(int i=0; i < MAX_SIZE; i = i

Colon in batch variable name

谁说胖子不能爱 提交于 2019-12-01 10:53:53
问题 I have a batch script which should have access to a variable named something like env:dev , so it has a colon inside... this variable is set by a third-party component, so I don't have influence on that naming... How can I access the content of this variable in my batch script? I know that : is a special character, so can I perhaps escape it? The following doesn't work: echo %env:dev% echo "%env:dev%" echo %env^:dev% ... Any suggestions? 回答1: A : colon has special meaning in CMD environment

Python: Moving files to folder based on filenames

戏子无情 提交于 2019-12-01 10:34:57
问题 I have a folder with 10 images that I wish to move into a new folder based on it's current filenames. I've successfully been able to move every images in the folder into a new folder, and as of now I've been successful at moving each image filename to its own folder but I've yet to figure out how to move all images with the same filename into one folder and the other to another folder. For example below I want to move the images accordingly. 1600_01.jpg ---> folder 1 1700_01.jpg ---> folder 1

What dummy X server should I use with openoffice on debian?

一曲冷凌霜 提交于 2019-12-01 08:41:15
I need to run openoffice in batch mode to turn .doc files into pdf, but openoffice won't start because it needs an X server. My linux box doesn't have one. Is there some dummy blackhole X server around I can use? I'm using debian etch. You could maybe try xvfb In the X Window System, Xvfb or X virtual framebuffer is an X11 server that performs all graphical operations in memory, not showing any screen output. From the point of view of the client, it acts exactly like any other server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual

What are the differences between kappa-architecture and lambda-architecture

纵然是瞬间 提交于 2019-12-01 08:30:33
If the Kappa-Architecture does analysis on stream directly instead of splitting the data into two streams, where is the datastored then, in a messagin-system like Kafka? or can it be in a database for recomputing? And is a seperate batch layer faster than recomputing with a stream processing engine for batch analytics? "A very simple case to consider is when the algorithms applied to the real-time data and to the historical data are identical. Then it is clearly very beneficial to use the same code base to process historical and real-time data, and therefore to implement the use-case using the

What are the differences between kappa-architecture and lambda-architecture

随声附和 提交于 2019-12-01 06:16:21
问题 If the Kappa-Architecture does analysis on stream directly instead of splitting the data into two streams, where is the datastored then, in a messagin-system like Kafka? or can it be in a database for recomputing? And is a seperate batch layer faster than recomputing with a stream processing engine for batch analytics? 回答1: "A very simple case to consider is when the algorithms applied to the real-time data and to the historical data are identical. Then it is clearly very beneficial to use

How to set a sqlcmd output to a batch variable?

亡梦爱人 提交于 2019-12-01 05:47:38
I'm trying to set the output of a sqlcmd query to a variable in a batch file. Here's my query: sqlcmd -S <SERVER> -d <DATABASE> -Q "select max(Column1)+1 from Table1" This gives me exactly what I would expect and what I want: ----------- 10 <1 rows affected> However, when I try to set it to a variable, I used this script: for /f %%a in ('sqlcmd -S <SERVER> -d <DATABASE> -Q "select max(Column1)+1 from Table1"') do set ColumnVar=%%a echo %ColumnVar% pause This gives me this result instead: <1 rows affected> I'm guessing this is because the loop is setting the variable to the last line. So is

What dummy X server should I use with openoffice on debian?

[亡魂溺海] 提交于 2019-12-01 05:37:12
问题 I need to run openoffice in batch mode to turn .doc files into pdf, but openoffice won't start because it needs an X server. My linux box doesn't have one. Is there some dummy blackhole X server around I can use? I'm using debian etch. 回答1: You could maybe try xvfb In the X Window System, Xvfb or X virtual framebuffer is an X11 server that performs all graphical operations in memory, not showing any screen output. From the point of view of the client, it acts exactly like any other server,