Questions tagged as 'batch'

1
answer

Determine an amount of time to respond to something in Batch

Is it possible to determine an amount of time for the user to answer a question in a batch? If I were to use a batch to turn off the computer, the user would have 1 minute to answer something in that batch, if he did nothing, the command would a...
asked by 05.12.2017 / 18:02
1
answer

How to enable / disable windows 7 devices through a .bat or other file type?

I need to enable and disable a specific device (device manager) frequently, and doing it manually is very annoying. I believe that with a .bat file it is possible to enable / disable each time I run. I've seen it's possible with DevCon, but it's...
asked by 04.11.2017 / 20:39
1
answer

get the last 2 tokens of a variable in Batch

I need to get the last 2 tokens of a variable in batch the variable is Rastreando a rota para user722-PC [192.168.1.106] The output I need is a variable containing user722-PC and another containing [192.168.1.106] and no, I c...
asked by 25.10.2017 / 08:30
1
answer

Bat to terminate process and close app on desktop

In the company I work with we have an application called Socket developed in Java to run files in the browser, but I need a bat to kill the process and close the application icon and start it again, but it will not accept 2 socket open, I have m...
asked by 31.01.2017 / 14:08
1
answer

How to retrieve the updated date in batch

I made a batch file, which changes the date of windows, however I want to create another file that when I run it, it retrieves the updated date. How to proceed?     
asked by 10.07.2016 / 15:50
2
answers

Batch script to rename file extension recursively

I need a bat script that allows you to rename all files with EXTENSION * .rar to * .cbr, you need to rename any files in the subfolders from the root directory D: \ Downloads. The command I made is so (ren * .rar * .cbr) That way I just renam...
asked by 16.09.2018 / 22:57
3
answers

How to disable CTRL + C in batch?

Is it possible to disable the CTRL + C batch command?     
asked by 30.04.2018 / 23:42
0
answers

Is it possible to optimize this code?

I asked a question here and they sent me a suggestion of a code that does a search on the contents of all .bat files in a directory using as criteria, names that are in a .txt file. set "File2Read=falhou.txt" set "File3Read=call.txt" If No...
asked by 27.06.2018 / 15:01
1
answer

How to show congruent sign (≡) in cmd

I was trying to do a "design" with ascii in cmd but this character set exits: "Ôëí", I know it's because of the delimitation of the characters that cmd can display and etc., but can you help me?     
asked by 03.07.2018 / 05:36
1
answer

How do I remove everything after the first word?

I would like to remove everything after the first word in each line of this text document. It works for simple character removal, but does not work when I try to remove the "|" of the text file. I'mtryingtousethefollowingcode:setlocalenablee...
asked by 29.09.2017 / 00:32