Questions tagged as 'batch'

3
answers

Running a batch as administrator

I need to create a batch to restart a service, it must include administrator credentials, something like this: net stop miservicio [user][password] net start miservicio [user][password] set /p DUMMY = Presione enter para finalizar......
asked by 05.12.2018 / 17:54
2
answers

run a .bat from C # without displaying the CMD window

I'm creating a .exe to run a .jar, it works, the only problem is that it shows a pop-up window ( CMD ) for a few milliseconds, is there any way to make this not happen? Here is my code to run the .bat : using System; nam...
asked by 08.11.2017 / 19:25
1
answer

Problem with php and batch

I already set apache so that PHP can execute .bat files, I have to move files from another server to my computer to do operations with it, when I execute the batch manually if I do the function, but at run it from php...
asked by 03.04.2018 / 02:33
4
answers

Copy file according to date using console

I have a list of .rar files in a network unit which are generated automatically one per day. What I'm trying to do is generate a .bat that goes to that network unit and copy the most recent file according to the date of modific...
asked by 09.02.2017 / 22:13
4
answers

Simple calculator by batch console

In class we are doing an exercise of making a calculator in batch . I wanted to make my own and simple, instead of taking one out there. In theory it should work, but the only thing it does when I enter the data is put:    "echo is disa...
asked by 11.11.2016 / 10:22
1
answer

how can I create a bat to make an infinite ping

Hi, I'm trying to do a simple thing, so I need to ping my router infinitely because I often lose the connection with my router and that way it goes a little better. I do not know much about bat but what I need is to put this command in a bat:...
asked by 16.03.2018 / 19:23
1
answer

Collect substring in each line of a file in CMD

That said, I wanted to go through a file.txt line by line and dump to another file each one of those lines taking away the first 9 characters and the last 2. I have the following in a .bat but it does not work, do you see the error? @echo o...
asked by 13.02.2017 / 09:19
2
answers

List Directory and Files .bat

Hi, I'm trying to list a directory with its contents in batch code and save it in a txt with the name of the date.txt, what I need is something like a gene tree I've tried with: dir /s /b > Listar.txt dir /s > Listar.txt an...
asked by 31.07.2018 / 16:11
1
answer

Operator 'greater than' and 'less than' in batch

Friends, I have the following script, which I developed as a simple exercise, but I do not work correctly with the logical operators < and > that I understand in Batch are LSS and GTR . Here my code: @echo o...
asked by 21.11.2017 / 02:27
1
answer

Bat renames files from different directory

I have the following script that works if I run it from the same directory: @echo off for %%i in (*.csv) do (set fname=%%~ni) & call :renameFile goto :eof :renameFile ren "%fname%.csv" "%fname:~13,16%.csv" goto :eof What I intend is to...
asked by 31.10.2017 / 09:08