cmd

joining same name of content and summing the value of each one together using batch script

こ雲淡風輕ζ 提交于 2020-07-07 07:14:18
问题 Years ago @Mofi helped me creating an amazing .bat script to sum values of many contents, also joining it names and making a total sum of them. Please check the old answer about it, focusing at the Mofi´s answer. How to ignore first and third data column on sorting and summing the text using batch file? But I noticed an issue. Values of less than $ 1,00 doesn't sum right. Values of greater than $ 99.999,99 doesn't sum right or are output wrong sometimes. One example: Using this .txt file to

joining same name of content and summing the value of each one together using batch script

ぃ、小莉子 提交于 2020-07-07 07:12:34
问题 Years ago @Mofi helped me creating an amazing .bat script to sum values of many contents, also joining it names and making a total sum of them. Please check the old answer about it, focusing at the Mofi´s answer. How to ignore first and third data column on sorting and summing the text using batch file? But I noticed an issue. Values of less than $ 1,00 doesn't sum right. Values of greater than $ 99.999,99 doesn't sum right or are output wrong sometimes. One example: Using this .txt file to

How do I use quotes in cmd start?

倾然丶 夕夏残阳落幕 提交于 2020-07-06 09:53:26
问题 Here somthing I want to do. start /wait ((c:\Program Files\NetDrive2\nd2cmd.exe) -c m -t ftp -blabla) If I do start /wait "c:\Program Files\NetDrive2\nd2cmd.exe -c m -t ftp -blabla" Then there is an error because "Program Files" has a space. If I do start /wait "c:\Program Files\NetDrive2\nd2cmd.exe" -c m -t ftp -blabla Then it interprets the argument for start so it also generates an error. Is there anyway to overlap the equation like bracket in normal program language? 回答1: Reference Start

Zipping a folder using 7-Zip from an asp page

穿精又带淫゛_ 提交于 2020-07-04 05:26:22
问题 I am trying to zip a folder from an asp page. This is my code: zipFolderName=folderName &"Zipped.zip" command="cd C:\Program Files\7-Zip & " command = command & "7z a -tzip " & zipFolderName & " """ & folderName & """" Response.Write command set objshell = Server.CreateObject("WScript.shell") objShell.exec (command) set objshell=nothing The command that is written in the Response.Write is cd C:\Program Files\7-Zip & 7z a -tzip D:/saveAll/DocumentsZipped.zip "D:/saveAll/Documents" When I run

Batch command to change an icon of the currently running window

时光总嘲笑我的痴心妄想 提交于 2020-06-29 04:25:11
问题 In my working environment I can have up to 10 command prompt windows open, each one set up to work in a different context. Having all of them open, I find myself having to switch between several of them to find the right one that I want to work with. I am already setting different foreground and background colors of each window based on some criteria, but it would be much more easier to distinguish between them by having a different colored icon in the taskbar. That way, I would not even have

BATCH Script - Create a folder with a specific part of the filename

自古美人都是妖i 提交于 2020-06-29 04:12:11
问题 I need help from you guys, I have been writing a script in Batch where I need to create a folder by using a part of the name of the file. I need to have for example : for this file : 20200614_SAP_ZCMF_MB51_V1.csv I only need for the name of the folder SAP_ZCMF_MB51. I need to delete the date and the version from the name of the folder. Here is the code that allows me to create a folder : @echo off setlocal enabledelayedexpansion for %%A in (*.csv) do ( echo file found %%A for /f "delims=" %%B

Delete all files in a folder but skip files that cointain certain string

江枫思渺然 提交于 2020-06-29 03:46:46
问题 I'm trying to clean the temp files, but I want skip some files that cointain a certain name. No matter the extension it is. Tried this way: @echo off setlocal EnableDelayedExpansion for /f "eol=: delims=" %F in ('dir "%windir%/temp" /b /a-d * ') do find "TESTE" %F > nul || del "%F" pause Wanted all files that cointains TESTE in name got skipped from deletation. But my script not even run. Can someone explain me what is wrong? 回答1: It is not absolutely clear whether you want to exclude files

Error using the 'find' command to generate a collection file on opencv

一个人想着一个人 提交于 2020-06-28 14:36:07
问题 I am facing a problem generating a collection file of the positive images to train the Haar Cascade in OpenCV to detect a car. On every tutorial I found on the internet, it is the same command, however i am unable to execute it. I am using Command Prompt and Windows Power Shell to execute this command. find ./positive_images/ -iname '.*pgm' > positives.txt the screenshot of the output I am running this command from root of my directory. The positive images are stored in positive_images folder

How to ignore first and third data column on sorting and summing the text using batch file?

孤人 提交于 2020-06-28 04:54:10
问题 I have made this script below: start /w "" "C:\Program Files (x86)\CoolUtils\Total PDF Converter\PDFConverter.exe" "%userprofile%\Desktop\teste.oxps" "%userprofile%\Desktop\teste.txt" del /f /s /q "%userprofile%\Desktop\teste.pdf" findstr /v /r /c:"http" /c:"Banrisul" /c:"Sac" /c:":" /c:"-" /c:"SAC" /c:"OUVIDORIA" /c:"B A N R I S U L" /c:"+" "teste.txt" > "output.txt" for /f "usebackq tokens=* delims=" %%a in ("output.txt") do (echo(%%a)>>output2.txt move /y output2.txt output.txt My output

Setting .libPaths() For Running R Scripts From Command Line Using Rscript.exe

a 夏天 提交于 2020-06-28 02:06:10
问题 I am trying to run R scripts via BAT files on Windows Command Prompt. The scripts require a few R packages such as data.table , tidyR , etc. For operational reasons, all required R packages and dependencies (including data.table ) are installed at C:\Users\username\Documents\R\R-3.5.1\library . I am not allowed to install RStudio in this environment. When I try "C:\Program Files\R\R-3.5.1\bin\x64\Rscript.exe" script.R , I get an error similar to Error in library(data.table) : there is no