-2
votes
4answers
48 views

Batch file for replacing text on a file

Hey i need help to change a large file, in this file i have this: Title word1: text text text text text text text word2: text ...
0
votes
1answer
15 views

batch file programming multiple varriables into one varriable

is it possible to do something like this? @echo off setlocal enabledelayedexpansion set 1=one set 3=three set onetwothree=output echo !%1%two%3%! pause where the variable %1% will become one and ...
0
votes
2answers
34 views

USB Flash drive batch file letter assignment

I was wondering if somebody could help. I have written a java program that loads a .cvs on a usb flash drive. This program is likely to be used on several different windows laptops but the program ...
0
votes
1answer
25 views

batch file variable problems

I am having problems with variables transferring throughout my batch file. This is a rough example of what I have: @echo off setlocal enabledelayedexpansion :one set variableone=outputone set ...
0
votes
2answers
29 views

calling a label wtih an output of a varriable

I am trying to do something like this: @echo off :beginning choice /c:123 if %errorlevel%== 1 set test= aaa if %errorlevel%== 2 set test= bbb if %errorlevel%== 3 set test= ccc call :%test%one pause ...
0
votes
3answers
56 views

Files not waiting for each other

I have two batch files as follows in which file2.bat is dependent on file1.bat's output: file1.bat @ECHO OFF setlocal enabledelayedexpansion SET "keystring1=" ( FOR /f "delims=" %%a IN ( Source.txt ...
-1
votes
3answers
48 views

Text output placement

I have two text files using which i want to get output.txt as follows: file1.txt: Windows 1.36 Linux 2.78 MacOS 3.45 Ubuntu ...
0
votes
2answers
43 views

Sequential Files execution

I have a master.bat file, which contains: call file1.bat call file2.bat I want file2.bat should not start run until file1.bat completes its execution and generates the output, but in my case ...
1
vote
1answer
48 views

Batch File: Prevent literal interpretation in a for /f loop

Currently I have a loop that runs through a list of items and copies them to a directory (archive). However, one of the items in the list (which has a global variable in the path-name) is being ...
1
vote
2answers
47 views

How to recursively search all the ocx, dll and exes in a folder and subfolder then sign them all barring thie third party ones, using a batch file?

I am using signtool to sign my msi. How to recursively search all the ocx, dll and exes in a folder and subfolder then sign them all using a batch file? I want to sign only the ones developed by me ...
3
votes
2answers
36 views

Batch file: Variable within a variable

I have a complex string I'm trying to parse. I have a short subroutine to fine the index of two specific characters, and I need the string in between. So the question is: How do I use variables inside ...
0
votes
2answers
26 views

How to write standard error in text file using batch command

For one file it's showing standard error on console i.e. command prompt. I want to print it on text file.
0
votes
1answer
27 views

How to write mutilple information in text file using windows batch scripting

I have a text file with no. of file formats. I want to print those file names to one text file one by one. Problem here is as soon as it check second file format name and try to write in text file, it ...
0
votes
4answers
27 views

How to compare file format in windows batch script

I have list of file names which contains .xml, .css, .js, .jsp, .java etc. I want a code that will allow you execute your function only when that file have .js or .jsp or .java extension.I don't know ...
-4
votes
4answers
44 views

How to remove specific pattern from string using windows batch script

I have list of files like first.js#19 edit, traval.jsp#233 edit, run.css#25 edit. I want to remove part from #, I just want file name ie first.js, traval.jsp, run.css How can do it using batch ...
1
vote
2answers
38 views

batch file - validate parameters

i have a batch file which should take inputs "-input1", "-input2" and "-input3". Here i need to validate the paramters like if user give the input parameter as "-test" or "-blah" or anyother ...
0
votes
1answer
26 views

batch process not running windows server 2008

I am trying to setup a task that will run hourly which will execute a batch file. When testing it manually it seems to run but not execute the process I expect it to. I was testing it to open ...
1
vote
2answers
76 views

Text files formatting-cum-consolidation

I have two text files using which i want to get output.txt as follows: file1.txt: Windows 1.36 Linux 2.78 MacOS 3.45 Ubuntu ...
0
votes
4answers
64 views

Parsing the output of wmic in shell script

I am trying to parse the output of WMIC and then to get the PID. My script is as following: @echo off setLocal enableExtensions enableDelayedExpansion FOR /F "tokens=1* delims=" %%A IN ('"wmic ...
0
votes
3answers
64 views

The basics of batch processing: Where should I start? [closed]

I would like to get into batch file processing for Windows, but I have zero experience in this area. If you can point me in a general direction, it would be greatly appreciated. Other potential ...
0
votes
1answer
29 views

What are key things to consider when running Windows batch files with VBA-Excel?

Would like to do some file management from Excel / VBA; possibly linked to mySQL; without PHP. I'm trying to get a good primer on dealing with batch-file processing. Any advice and simplified learning ...
1
vote
1answer
38 views

Proper file locations

We have been having some issues where people have been putting files into the folder for the wrong job number. files for 664585_custnum_qty_filetype.dat should be in folder 664585 I am looking for a ...
0
votes
2answers
37 views

Batch script, How to trim part of a line in a text file

I have this script here to list all the file in a directory and output to Index.txt echo off for /r %%a in (*) do echo %%a >> Index.txt The script output the whole path like ...
1
vote
1answer
34 views

How do i write a simple If Else query with wmic.exe

i write a simple wmic.exe query: if wmic product where "name like '%Adobe Reader%'" get version Now i want to check, if Version equals 11.0.04 If Version eq 11.0.04 goto end Thanks a lot
0
votes
2answers
50 views

Batch File display correct answer to missed answer

I am trying to figure out how to write a batch file line that gives the correct answer to a question when the player answers it incorrectly. Here is the first line of the game that we are doing. ...
0
votes
1answer
130 views

Copy Files from multiple subdirectories to root directory and keep duplicates

So I have a list of directories and sub directories with images in them. I need to get then names of all of these files in the same format and I need to edit them for duplicates or images that are ...
0
votes
5answers
143 views

In vbscript how to run the bat file

I am created the bat file using vbscript. And run that script But batch file is not run Please help me Const ForReading=1, ForWriting=2, ForAppending=8 Set objFSO = ...
0
votes
0answers
33 views

batch programming ignore date and find new

How can i do so if my variable %paaa% is not equal to %%u ( %%u is showed in my code) then it will ignore the nearest date, and find the next? for /F "tokens=1,2,3 delims=-" %%A in ("%current-date%") ...
0
votes
1answer
61 views

Batch scripting programfag

the first time this is run, then the user can choose what kind of program they have in their school. Then (as you look further down in the source code) will come with the date of the first test of ...
1
vote
2answers
160 views

Change a file name in a batch script

I need to change a file name in a batch script. Below is a sample I made SET date = 20210803 SET job = 69187 cd "H:\arbortray foldher\" for %%i in (*.txt*) do REN %%i randum_%job%-text-%date%%%i ...
0
votes
1answer
22 views

i don't have winzip or other tools to compress . I want to use compress with forfiles command in batch file . How to use it and rename . I

I want to compress log files on my prod server but i do not have winzip and pther tools . only compress command is working I tried using it with forfiles but the zip file created in throwing error. ...
1
vote
1answer
155 views

How to move files with adb shell?

How can I move files with adb shell ? For example I would like to move SystemUI.apk from /system to /system/app I didn't find any command to move files inside system partition with adb shell. Do ...
0
votes
1answer
25 views

ADB - How to not display action results?

I am doing small toolkit with adb. And it is really annoying if everytime I type command ADB PUSH or ADB PULL or any other adb command, it displays results: 2952 KB/s (4989129 bytes in 1.650s) How ...
0
votes
0answers
22 views

Batch read netcdf file in R and apply a function save output for each file [duplicate]

I want to read a folder full of files which go from Geopotential_height_1948_500mm_00z.nc to Geopotential_height_2012_500mm_00z.nc and I want to extract one variable : x ...
0
votes
1answer
157 views

Read specific Word(Line 2, Word 3) from a text file by batch script

I need to read specific words from a text file through batch script. Say I want Line 2 word 3 to be read. Here is the code:: @ECHO OFF cls SET /P line=Please enter Line number: ECHO ...
-2
votes
1answer
34 views

New version, want to update?

Is it possible that a batch file is checking a file on the web, ( ETG in the file its 1, and if %currentversion% is lower than that file, it ask if you want to update the batch file, and then it ...
0
votes
1answer
18 views

Converted Batch File

I was writing a batch file and I tried this command %~f0. Then notepad ++ ask me to reload the file because it was edited from another program. I reloaded it and all the batch code became this strange ...
0
votes
2answers
181 views

How to batch convert .sph files to .wav with sox

I have a directory with many folders containing hundreds of .SPH files. I need to convert all .SPH files into .wav format. I have adopted the following code: cd %~dp0 mkdir converted FOR %%A IN (%*) ...
0
votes
1answer
36 views

BAT - How would I detect the number of days from a date?

So today I wanted to make a simple bat file, that sorts builds of my app into folders in a specific hierarchy: App name Day 0 Build 1 D0_B1_G1.html Build 2 D0_B1_G2.html Day 1 Build 1 ...
0
votes
1answer
96 views

copy folder to multiple servers with different %userprofile%

I do not have access to GPO or AD/OU, so what I found to do the easiest was to create a batch file for users. Here is what I want to achieve : I have over 50 servers, and 10 users that will be ...
0
votes
1answer
100 views

PowerBuilder and batch processing

I'm using PowerBuilder 10.5 and as a newbie I'm a bit stuck and since Google isn't giving me a satisfying answer I'm asking some advice from the Stack Overflow group. I have a Rich Text Edit field in ...
-1
votes
1answer
51 views

Is it possible to create a batch file that will call another batch file at some point and also supply it with a sequence of inputs

I have a batch file (lets say "test.bat"). Now when we run this test.bat it asks for user inputs during it's execution, For ex. user credentials and then shows a menu. The user can choose an option ...
0
votes
1answer
294 views

How to concatenate files with a new line between files in dos command line

I know I can concatenate files in a directory like: copy /b *.txt all.txt But I got one more question. How should I put new line between each files? I found that it's a problem for copy /b command. ...
0
votes
0answers
38 views

How to use keyboard shortcut keys throug batche file

I want to write a batch file that should open a file.txt and should do ALT + S and ALT + F and exit the file automatically . Thanks in advance for your quick response :)
0
votes
1answer
51 views

Traversing subdirectories & create simillar directory structure to process each file in sub directories

I want to create a batch script to process the directory and files in that directory, Basically i am using one tool to convert files in directory to some format and it can take each file separately ...
0
votes
1answer
22 views

start/affinity does not seem to work

I have been trying to use start/affinity command in my bat file like: start /affinity 4 my_job.bat Where I would like to run my bat job on cpu number 4. I have 4 core machine. I noted that ...
0
votes
3answers
469 views

Batch file to rename folders with wildcard or create a new folder and move contents?

I'm trying to tidy up a data folder and have written a batch file to take care of a lot of preliminary work (delete empty folders, delete junk files, etc), but I'm falling over when trying to deal ...
-1
votes
1answer
83 views

Any batch processing system in the cloud?

I have a PHP-based website that executes a binary (C++ standalone compiled code). Right now I have this system in an Amazon EC2 machine, so that I am able to freely execute this binary. What I need ...
0
votes
1answer
1k views

How to open a URL in batch file that require Username and Password?

In the Command Prompt, I can open a url by START Http://www.foobar.com What if the website require to type in a Username and Password? as shown in btw the Username is a domain account like ...
0
votes
1answer
50 views

how to write a batch file which can identify value from a text file and store that value in some other text file

i have a text file which have some number content and string content,I want to write a batch which can identify number content and store the number content from each line in some other text file.

15 30 50 per page