batch-processing

Batch File > Javascript > WinSCP > Check if file exists

半世苍凉 提交于 2019-12-30 11:53:28
问题 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,

best practice for directory polling

末鹿安然 提交于 2019-12-30 07:20:10
问题 I have to do batch processing to automate business process. I have to poll directory at regular interval to detect new files and do processing. While old files is being processed, new files can come in. For now, I use quartz scheduler and thread synchronization to ensure that only one thread can process files. Part of the code are: application-context.xml <bean id="methodInvokingJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><br/> <property name=

Execute more than 500 operations at once in Firestore Database

瘦欲@ 提交于 2019-12-30 07:06:10
问题 I'm trying to create a WriteBatch to keep control of one of my dynamic references in my database. My app have a simple User-Follow-Post-Feed model where I want my user to see in his feed the posts of all the users he is following. What I'm doing after research on Firebase examples (as Firefeed ) and a lot of posts on Stack Overflow. The optimal idea is keep a path ( collection in this case) where I store the Ids of the posts that my user should see in his feed, which means keep control of

webapi batching and delegating handlers

余生长醉 提交于 2019-12-29 05:23:04
问题 based on my last post I was able to get batching working... until a certain point. In addition to registering the route specific handler I also have 2 delegating handlers Authenticate the user logging the batch handler goes through the delegating handlers authenticating the user and logging the request. when the messagehandlerinvoker starts to send the child/nested requests the following exception is thrown. System.ArgumentException was unhandled by user code HResult=-2147024809 Message=The

Run all SQL files in a directory

陌路散爱 提交于 2019-12-27 12:09:41
问题 I have a number of .sql files which I have to run in order to apply changes made by other developers on an SQL Server 2005 database. The files are named according to the following pattern: 0001 - abc.sql 0002 - abcef.sql 0003 - abc.sql ... Is there a way to run all of them in one go? 回答1: Create a .BAT file with the following command: for %%G in (*.sql) do sqlcmd /S servername /d databaseName -E -i"%%G" pause Place this .BAT file in the directory from which you want the .SQL files to be

Run all SQL files in a directory

可紊 提交于 2019-12-27 12:09:16
问题 I have a number of .sql files which I have to run in order to apply changes made by other developers on an SQL Server 2005 database. The files are named according to the following pattern: 0001 - abc.sql 0002 - abcef.sql 0003 - abc.sql ... Is there a way to run all of them in one go? 回答1: Create a .BAT file with the following command: for %%G in (*.sql) do sqlcmd /S servername /d databaseName -E -i"%%G" pause Place this .BAT file in the directory from which you want the .SQL files to be

Batch rename folders

无人久伴 提交于 2019-12-25 12:09:12
问题 I have about 2000 folders all named like this dataul_-_ppfsefs music_-_ppfsefs fun [gghhhses] pictures_-_ppfsefs backup [gghhhses] tempfiles_-_ppfsefs trash_it_-_ppfsefs There are two unwanted portion at the end of the name "_-_ppfsefs" and " [gghhhses]", How to I rename them to look like this dataul music fun pictures backup tempfiles trash_it Edit: I'm on Mac OSX (installed brew, macports). 回答1: The following two commands should do it: for dir in * ; do mv "${dir}" "${dir/_-_ppfsefs/}" ;

How to post on multiple queues using single job/ JMSwriter in spring batch

谁都会走 提交于 2019-12-25 07:19:07
问题 I am a newbie at Spring Batch and have recently started using it. I have a requirement where I need to post/write the messages read from each DB record on different queues using single Job. As I have to use reader to read the messages from DB and use processor to decide on which queue I have to post it. So my question is Can I use single JMSwriter to post the messages on different queues as I have to use single Job and DB Reader. Thanks in Advance 回答1: As I know JMSwriter not supports it (it

Batch convert .csv files to .shp files in R

。_饼干妹妹 提交于 2019-12-25 06:39:23
问题 I am trying to convert a large number (>500) of text files into shapefiles. I can successfully convert a single .csv into a projected shapefile. And I can get lapply and 'for' loops to work when just loading, cleaning up, and exporting the text files. But the code fails when I add in steps to convert to shapefiles within the loops. Below are two ways I've tried tackling the problem and the associated error messages: General processing/definitions- library(rgdal) library(sp) crs.geo<-CRS("

Batch script to store certain output details in a Variable

风格不统一 提交于 2019-12-25 05:12:00
问题 Could someone help me in this Batch script. I need to run the below command svn info and to get certain details in a variable. Path: . Working Copy Root Path: C:\Users\jslevin\Desktop\SQL URL: https://ofss220383.in.oracle.com:18080/svn/SVN_DEMO/branches/FCUBS_TEST/Soft/AM/SQL Relative URL: ^/branches/FCUBS_TEST/Soft/AM/SQL Repository Root: https://ofss220383.in.oracle.com:18080/svn/SVN_DEMO Repository UUID: 866b0b85-a196-4771-a359-d37e344426b2 Revision: 47 Node Kind: directory Schedule: