cmd

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

孤街浪徒 提交于 2020-06-28 02:05:50
问题 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

Open git bash using processBuilder and execute command in it

梦想与她 提交于 2020-06-26 06:53:56
问题 Is it possible in java by using something like ProcessBuilder to open gitbash, write a command (for example git status) and output the results? I can successfully open git bash by using the following code but i don't know how to write any commands in it. String[] commands = {"cmd","/C","C:\\Users\\......\\Git\git-bash"}; ProcessBuilder builder = new ProcessBuilder(commands); builder.redirectErrorStream(true); Process process = builder.start(); StringBuilder sb = new StringBuilder();

How to gently close Chrome using CMD or VBS?

天涯浪子 提交于 2020-06-25 06:03:53
问题 I'm having a little problem about closing gently Chrome in order to automatically clean cache. I have a website that is not refreshing correctly, but it does if I clean the cache. For now I have a .bat file with the following code: taskkill /F /IM chrome.exe /T > nul del /q "C:\Users\Francisco\AppData\Local\Google\Chrome\User Data\Default\Cache\*" FOR /D %%p IN ("C:\Users\Francisco\AppData\Local\Google\Chrome\User Data\Default\Cache\*.*") DO rmdir "%%p" /s /q timeout 8 start chrome --restore

Python cannot find package h2o in anaconda

怎甘沉沦 提交于 2020-06-25 00:41:47
问题 When I try to import h2o I am told that the package does not exist. When I try to install it, it tells me it already exists. I have tried wiping it out of my computer and reinstalling to no avail. At this point all I can think is some environment variable. (C:\Users\Lanier\Anaconda2) C:\Users\Lanier>python Python 2.7.12 |Anaconda custom (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

Python cannot find package h2o in anaconda

…衆ロ難τιáo~ 提交于 2020-06-25 00:41:08
问题 When I try to import h2o I am told that the package does not exist. When I try to install it, it tells me it already exists. I have tried wiping it out of my computer and reinstalling to no avail. At this point all I can think is some environment variable. (C:\Users\Lanier\Anaconda2) C:\Users\Lanier>python Python 2.7.12 |Anaconda custom (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

How to take input from user and change directory

偶尔善良 提交于 2020-06-23 19:14:49
问题 How do I take input from a user and then i.e. change a directory based upon that input. Example, lets say I ask, please type in directory of A when pressing enter, the directory should change to it and echo out the working directory to the user. @ECHO OFF :: This batch file takes input from the user, delete, copy and install new files. ECHO Please enter the location of your Zibo folder: set mydir=%CD% PAUSE ECHO your working directory is: ECHO %mydir% PAUSE 回答1: You can use Set /P to request

How to take input from user and change directory

牧云@^-^@ 提交于 2020-06-23 19:00:42
问题 How do I take input from a user and then i.e. change a directory based upon that input. Example, lets say I ask, please type in directory of A when pressing enter, the directory should change to it and echo out the working directory to the user. @ECHO OFF :: This batch file takes input from the user, delete, copy and install new files. ECHO Please enter the location of your Zibo folder: set mydir=%CD% PAUSE ECHO your working directory is: ECHO %mydir% PAUSE 回答1: You can use Set /P to request

How to take input from user and change directory

笑着哭i 提交于 2020-06-23 18:58:09
问题 How do I take input from a user and then i.e. change a directory based upon that input. Example, lets say I ask, please type in directory of A when pressing enter, the directory should change to it and echo out the working directory to the user. @ECHO OFF :: This batch file takes input from the user, delete, copy and install new files. ECHO Please enter the location of your Zibo folder: set mydir=%CD% PAUSE ECHO your working directory is: ECHO %mydir% PAUSE 回答1: You can use Set /P to request

How to get exitcode from Powershell and return to CMD?

橙三吉。 提交于 2020-06-23 08:52:43
问题 I have a powershell script. I run my powershell script using a CMD file. I want to get the exit code from my powershell script and return the value to the CMD. I tried this. but it does not return the exitcode, when I execute the CMD file to call the powershell. PowerShell Script $SN = "17A1" $BID = "#SBCM#DBCM" $FB = "UdpdqfP.Bd" $SN2 = Get-Content .\out4 | Where-Object{$_.Contains("$SN")} if($SN2) { Write-Host "OK" } else{ Write-Host "Not ok" $ExitCode = "ExitCode" $ExitCode = "123" Exit

How do I make a 'for' loop in the command prompt?

浪子不回头ぞ 提交于 2020-06-16 05:56:29
问题 I'm working with a command-line program that does image-processing, and I need to run the same command on an entire folder of images. I have heard that I can run loops in the command prompt, but I have seen all sorts of different examples online and can't figure out the syntax. The images in the folder are labled "single0.pgm, single1.pgm, single2.pgm,..." all the way to single39.pgm. The command I need to run is: DebayerGPU.exe -demosaic DFPD_R -CPU -pattern GRBG -i single0.pgm -o single0