batch-processing

Update a batch file from another batch file

送分小仙女□ 提交于 2020-01-24 00:32:09
问题 Dear StackOverFlow Members, Please help me with this batch file. I would like to use the answer given from the "SET /P INPUT=%=%" and have it update another batch file permanently. This is the first batch file that runs to get an answer from the user @echo off cls echo. echo ................................................................. echo ..... Specify what the name of the Store is, this will send ..... echo ............... alerts to abd@abc.co.za .............. echo ...................

Batch replace text inside text file (Linux/OSX Commandline)

*爱你&永不变心* 提交于 2020-01-22 10:02:13
问题 I have hundreds of files where I need to change a portion of its text. For example, I want to replace every instance of "http://" with "rtmp://" . The files have the .txt extention and are spread across several folders and subfolder. I basically am looking for a way/script that goes trough every single folder/subfolder and every single file and if it finds inside that file the occurrence of "http" to replace it with "rtmp". 回答1: You can do this with a combination of find and sed : find .

Expanding variables in a Windows batch file

不羁的心 提交于 2020-01-17 08:14:00
问题 I run the following command in a Windows batch file: start "" "C:\PDF Viewer\PDFXCview.exe" /A "page=1&zoom=33.3" "G:\my pdfs\file 1.pdf" /A "page=4&zoom=55.5" "G:\my pdfs\file 2.pdf" The works perfectly fine and opens both PDF files using their respective parameters. However, to make the process cleaner, I would like to start using variables in place of the PDF files (and even the PDF viewer executable). However, when I use variables, only the first PDF file opens: set PDF1="G:\my pdfs\file

Expanding variables in a Windows batch file

柔情痞子 提交于 2020-01-17 08:13:06
问题 I run the following command in a Windows batch file: start "" "C:\PDF Viewer\PDFXCview.exe" /A "page=1&zoom=33.3" "G:\my pdfs\file 1.pdf" /A "page=4&zoom=55.5" "G:\my pdfs\file 2.pdf" The works perfectly fine and opens both PDF files using their respective parameters. However, to make the process cleaner, I would like to start using variables in place of the PDF files (and even the PDF viewer executable). However, when I use variables, only the first PDF file opens: set PDF1="G:\my pdfs\file

Batch Script How to Set Variabes inside another variable

谁说我不能喝 提交于 2020-01-17 05:03:25
问题 i want to do something like this 1.bat var1=The bot now At %PlaceName% 2.bat SET PlaceName=Hotan Echo %var1% it should be like: The bot now At Hotan but it is shown like: The bot now At %PlaceName% 回答1: 1.bat @echo off setlocal set "var1=The bot now At !PlaceName!" call 2.bat 2.bat @echo off setlocal EnableDelayedExpansion SET PlaceName=Hotan Echo %var1% Another way: 1.bat @echo off setlocal set "var1=The bot now At %%PlaceName%%" call 2.bat 2.bat @echo off setlocal SET PlaceName=Hotan call

How to get file in folder in batch process?

被刻印的时光 ゝ 提交于 2020-01-17 04:59:26
问题 I have to get file in a folder. My process can work in Batch . My code is this: Io file; FileIoPermission perm; int handle; Filename fileName; [handle, filename] = WINAPI::findFirstFile( myFilePatch + "\\*.txt"); fileOpen = strFmt (myFilePatch + "\\" + filename); if (filename) { perm = new FileIoPermission(filename, 'r'); perm.assert(); file = new TextIo(filename, 'r', 65001); } //etc... other code // I go on to find another file filename = WinAPI::findNextFile(handle); fileOpen = strFmt

Local Partitioning in Spring batch

霸气de小男生 提交于 2020-01-15 10:07:06
问题 I'm actually using local partitioning to export customer table that has 100K rows to multiple XML files ( as i can't export data to one file because StaxEventItemWriter<T> isn't Thread-safe) but i don't get better results with multiple Threads even when increasing gridSize to 10. I think the problem in the StaxEventItemWriter because i have some code errors like : java.lang.NullPointerException: null at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.flush(XMLStreamWriterImpl.java:397

Local Partitioning in Spring batch

旧巷老猫 提交于 2020-01-15 10:06:55
问题 I'm actually using local partitioning to export customer table that has 100K rows to multiple XML files ( as i can't export data to one file because StaxEventItemWriter<T> isn't Thread-safe) but i don't get better results with multiple Threads even when increasing gridSize to 10. I think the problem in the StaxEventItemWriter because i have some code errors like : java.lang.NullPointerException: null at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.flush(XMLStreamWriterImpl.java:397

linux batch jobs in parallel

故事扮演 提交于 2020-01-14 03:16:07
问题 I have seven licenses of a particular software. Therefore, I want to start 7 jobs simultaneously. I can do that using '&'. Now, 'wait' command waits till the end of all of those 7 processes to be finished to spawn the next 7. Now, I would like to write the shell script where after I start the first seven, as and when a job gets completed I would like to start another. This is because some of those 7 jobs might take very long while some others get over really quickly. I don't want to waste

Tensorflow mixes up images and labels when making batch

筅森魡賤 提交于 2020-01-14 02:08:15
问题 So I've been stuck on this problem for weeks. I want to make an image batch from a list of image filenames. I insert the filename list into a queue and use a reader to get the file. The reader then returns the filename and the read image file. My problem is that when I make a batch using the decoded jpg and the labels from the reader, tf.train.shuffle_batch() mixes up the images and the filenames so that now the labels are in the wrong order for the image files. Is there something I am doing