Hot answers tagged

2

How can I find out the mac addresses of all bluetooth devices the adapter has detected? Some possiblilites: BluetoothCL (command line) BluetoothView (GUI) BluetoothLogView (GUI, with logging) BluetoothCL from Nirsoft BluetoothCL is a small console application that dumps all current detected bluetooth devices into the standard output. For each ...


2

Alright, I already figured it out. See the batch file below. cd C:/Projects/ SET p=C:/Projects/ SET a=%1 for /D %%x in (%a%*) do if not defined f set "f=%%x" SET pa=%p%%f% TortoiseProc.exe /command:log /path:%pa%


2

To use unicode, add the code chcp 65001 This will change the code page. It stays that way until you close the window. If you want to have this always run, (not necessarily recommended, because unicode can sometimes break batches), you can add a reg key string (reg_sz) to HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor and name it AutoRun. Change ...


2

Hope this helps you. Run this within the "flash tv series folder" root folder Just MK4's forfiles /s /m *.mk4 /c "cmd /c move @path %CD%" Everything Except for Directories... forfiles /s /m * /c "cmd /c if @isdir==FALSE move @path %CD%"


2

I know this is an old posting; but, just for anyone else that is struggling with this, the best approach to take is to utilize PhantomJS as the browser. Since its headless, it quietly runs the browser steps and processes. Also, it has no issues if run as part of a Python script via windows scheduled task while not logged in. All you need to do is: swap out ...


1

I need a batch file that opens cmd, runs two commands, and keeps cmd open taskkill /F example.exe This is an invalid command. You need to use: taskkill /F /IM example.exe /IM image name. The image name of the process to be terminated. Wildcard '*' can be used to specify all image names. Use the following batch file (test.cmd): @echo off setlocal ...


1

FINDSTR /I /C:"Registrant Name" Applied next paragraph from findstr artice: Searching for Spaces When the search string contains multiple words, separated with spaces, then FINDSTR will return lines that contain either word (OR). A literal search (/C:"string") will reverse this behaviour and allow searching for a phrase or sentence. A ...


1

Provided there are no spaces in your current names, then the following should work from the command line: for /f "skip=1 tokens=1*" %A in (filenames.txt) do ren "%A" "%B" The percents must be doubled if put in a batch file: @for /f "skip=1 tokens=1*" %%A in (filenames.txt) do ren "%%A" "%%B" FOR is the most complicated internal command available to ...


1

I get invalid GET expression for the second command. for /F "usebackq" %%R in (`wmic PROCESS where "commandline like '%%teststr%%'" get Processid,Caption,Commandline`) do echo OUTPUT is %%R You need to escape the , (commas) in the for expression, using the ^ Escape character: for /F "usebackq" %%R in (`wmic PROCESS where "commandline like '%%teststr%%'" ...


1

I appreciate your question because you stated "Do you have any ideas how I can accomplish my task?" and you didn't ask for a code writing. I guess you want to learn. So this answer. Focus on which is the Key, something that is unique and allow you to select only the items over which you have to operate. In this case you just said the first four characters ...


1

You should read some documentation. You can start by typing help if or if /? from the command line, and if you read carefully, you will see one problem with your logic. IF ERRORLEVEL 0 means "return TRUE if ERRORLEVEL is >=0". This will always be true after running FINDSTR. If you did not have the TIMEOUT before your IF, then you could simply use the IF ...


1

The French accents are not copying properly Add chcp 1252 (West European Latin) to the start of the batch file. Without this I can reproduce your problem (my default code page is 850 - Multilingual (Latin I) With it added I get the expected text on the clipboard. Example 1: F:\test>type test.cmd echo syst├×me | Clip F:\test>test F:\test>echo ...


1

To mute server trace, you can redirect output from your bat to NUL. Example: your.bat > NUL 2>&1 You can find more about redirecting output on Windows here: http://www.robvanderwoude.com/battech_redirection.php Your second problem with Jenkins seems to an expected behaviour. You can find more explanation in the official Jenkins wiki, here: ...


1

I managed to do this by using the following: for /F "tokens=*" %%A in ("D:\All Pcs\pclist.txt") do ( echo. echo %%A >> "D:\All PCs\RAM_LOG.txt" systeminfo /s:%%A | findstr /C:"Total Physical Memory" >> "D:\All PCs\RAM_LOG.txt" ) Where pclist.txt is a list of all host names to scan.



Only top voted, non community-wiki answers of a minimum length are eligible