Questions tagged as 'batch'

1
answer

pass external parameters to sqlcmd via batch

I used it in oracle so I would like to know if you have any similar method for sqlserver (sqlcmd) . Batch sqlplus.exe system/123@localhost/xe @..\CRIA_TABELAS.sql "%last_bill%" .sql file SELECT * FROM TB_VENDAS_&1...
asked by 06.09.2018 / 14:18
0
answers

Run .exe as administrator in .bat file

I have the following situation: I have a .bat file that should open a program (.exe), but this executable file must be opened with administrator permissions, I tried using the runas command as vi some informing, however this command needs to b...
asked by 16.07.2018 / 16:37
2
answers

Rename process

I have a script done in Windows CMD and wanted to see if it is possible to change the name of the process when it is executed. Example: I have 3 script (1- ler_log.bat; 2 - recycle.bat; 3 - Alarm_alter.bat) when they run in Task Manager th...
asked by 01.08.2018 / 16:09
1
answer

Date and time format in xls / csv conversion

I have a code that works, however I need help in the format of the date. In the conversion from xls to csv converts the date to mm / dd / yyyy and time in h: mm and I wanted it to be dd-mm-yyyy and the time in hh: mm. What do I need in my code?...
asked by 19.06.2018 / 23:37
1
answer

Script to check process running and finalizing or not

I have a process called monitor.exe and it can not have 2 active processes because it is a print monitor that if it has 2 active processes it will issue 2 duplicate invoices, so I would like to know if it has how do I make a script that checks i...
asked by 19.04.2018 / 15:01
1
answer

Script to identify 2 active services, drop the 2 and upload only 1

Next, I have a service here in my environment that runs on some machines, however this service can not be duplicated (they can not have 2 active services at the same time) I would like to know if it is possible to write a script that checks if i...
asked by 16.04.2018 / 21:13
1
answer

concatenate multiple txt files with line break in BAT

Can anyone tell me if I can add line break, for each content of each file? For example, in a file it has the content (dog) and in other files other types of content, however the files do not have a line break at the end, thus joining the cont...
asked by 04.12.2017 / 13:56
1
answer

How to change (replace) information from within a .txt file using .bat? [closed]

What I want to do is type a sed in shell. I have a .txt file as several information inside, I want to replace one sequence of numbers with another. As far as I did the script identifies the files through a variable SET /P COD01=C...
asked by 01.06.2017 / 06:52
2
answers

Add suffix to the first line of text file using BAT

Good people! I'm editing some F1C game mods, which use text files to store the AI's data for the pilots. In the first line of each file comes the name of the pilot: Michael Schumacher ... and I would like to add a suffix at the end of...
asked by 30.04.2017 / 17:54
1
answer

Create .bat file to open Nodejs terminal and execute one or more commands

I would like to create a .bat file to automate a process I have to do every day. When I start working, I open the terminal of nodejs, access the directory of my project (in my case I use babel) and then I need to execute the command npm ru...
asked by 11.09.2016 / 17:16