Questions tagged as 'cmd'

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

CMD executes tasks in a separate window, how to do it so that it can be executed again in the main window?

Working with Django in the CMD suddenly now executes all the processes in a separate window causing several inconveniences. I need you to do them again in the original window as you always did.  I chose to illustrate the case the typical "manag...
asked by 28.06.2016 / 11:00
2
answers

delete exe files and exclude one

I'm creating a bat to remove all .exe files from my desktop and downloads folder (which sometimes accumulate from so many downloads) ... call:delfiles "*.exe" exit :: funcion delfiles @echo off pause goto:eof :delfiles set delfiles=%1 attr...
asked by 27.10.2016 / 16:03
2
answers

How to import into MySQL database from command line?

I'm trying to import a more or less large database ( 1Gb ) using PHPMyAdmin . The process is too slow and always cuts. Is there a way to import a database MySQL from the command line?     
asked by 27.12.2018 / 15:35
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
2
answers

Save cmd command result executed from java in a variable

Is it possible to store the result of the execution of a command from java in a variable of type string? I've tried it this way but the output of stdInput.readLine () is always NULL, something I'm doing wrong. Another question is whether it is p...
asked by 26.01.2017 / 19:31
1
answer

Launch program using cmd from Java

I want to launch a program from the execution of my program in java. The command I use in the cmd would be changing user, password and url: "start / B / D" c: \ Program Files (x86) \ Common Files \ Juniper Networks \ Integration "pulselaunche...
asked by 30.10.2017 / 15:28
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
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

Start XAMPP server from CMD

Is there a way to start / stop XAMPP (Apache server and mySql) using the terminal in Windows 10? PS: The path where the program is is the one created by default when installing it     
asked by 17.11.2017 / 22:30