batch-file

Exporting .csv from R & Batch file

自古美人都是妖i 提交于 2020-01-05 10:07:31
问题 I run a report in R every morning and I'm trying to automate this task. I have a Windows machine and I've created a task within Task Scheduler. I can get the file to run at a certain time, but I can't get it to export the csv. My initial thoughts is that there is a disconnect between forward- & back-slashes, but I'm not sure where the break is. Anyone have any thoughts? R_script.R setwd('C:/Users/Me/Desktop') x <- runif(5) y <- runif(5) xy <- data.frame(X = x, Y = y) write.csv(xy, 'C:/Users

Exporting .csv from R & Batch file

拈花ヽ惹草 提交于 2020-01-05 10:07:28
问题 I run a report in R every morning and I'm trying to automate this task. I have a Windows machine and I've created a task within Task Scheduler. I can get the file to run at a certain time, but I can't get it to export the csv. My initial thoughts is that there is a disconnect between forward- & back-slashes, but I'm not sure where the break is. Anyone have any thoughts? R_script.R setwd('C:/Users/Me/Desktop') x <- runif(5) y <- runif(5) xy <- data.frame(X = x, Y = y) write.csv(xy, 'C:/Users

In powershell after changing to cmd unable to call a bat file through a batch script file

耗尽温柔 提交于 2020-01-05 08:51:56
问题 I created a bat file to setup my workspace by changing the directory to the workspace directory and calling the setupEnv.bat file. But while I'm executing the below bat file in PowerShell, the instructions after cmd are not executing. I need to call the setupEnv.bat file in cmd. If I remove the cmd it will work fine. But I want call the setupEnv.bat on cmd not in PowerShell. D: cd D:\WorkSpace\ cmd call setupEnv.bat echo "Setup Completed" After calling the setupEnv.bat and calling cmd, will

batch script print the command that would be executed rather than executing

你说的曾经没有我的故事 提交于 2020-01-05 08:51:37
问题 Is it possible to set a cmd.exe shell / batch file to print what would be executed but not actually execute it? For example, given a batch file that takes some arguments, based on those arguments selects some other batch files to run, those batch files execute some commands, may or may not call other files/commands etc. I would like to be able to run the top level batch file with all possible combinations of it's input arguments and capture what each arg combination would execute - without

'cscript' is not recognized inside a batch

喜你入骨 提交于 2020-01-05 08:34:07
问题 I need to call a .bat that calls a .vbs. When i run FindDir.vbs from command prompt is ok, but when i try to call it from CallingVbs.bat i got the error message. 'cscript' is not recognized as an internal or external command. The code i'm using to call .vbs is the same to .bat and to command prompt. cscript FindDir.vbs Both files are in same folder. I do not understand why cscript command works in command prompt but not in .bat. Could anyone explain me why it happens? Thanks 回答1: By mistake i

using cmd's Start command to run exe. Works locally, but not remotely

孤人 提交于 2020-01-05 08:22:44
问题 Some background: We are trying to automate installation of an agent on servers. The automated workflow will check for servers that need this install. If so, the workflow copies the necessary install files as well as a .cmd batch file. When calling this .cmd script locally, the install works fine. But when trying to call this script remotely from the workflow server, it hangs on a certain line in the batch. Snippet from the script se_install.cmd: echo Installing SE 9.4 Agent start "" /wait

Select files between two dates

与世无争的帅哥 提交于 2020-01-05 08:12:32
问题 @echo off forfiles /p "C:\Documents and Settings\Test\Downloads" /d +01/07/2011 /d -15/07/2011 /c "cmd /c echo @file" pause Hello, I would like to select all files modified between 01/07/11 and 15/07/11 (French : jj/mm/aaaa or USA : dd/mm/yyyy). But the "/d" parameter can be used only one time. How can I do that ? Thanks if you can help me. :) 回答1: This is not an option for that particular command. You could use the selection as input to a FOR loop. Add another indention for each criteria you

Select files between two dates

柔情痞子 提交于 2020-01-05 08:12:14
问题 @echo off forfiles /p "C:\Documents and Settings\Test\Downloads" /d +01/07/2011 /d -15/07/2011 /c "cmd /c echo @file" pause Hello, I would like to select all files modified between 01/07/11 and 15/07/11 (French : jj/mm/aaaa or USA : dd/mm/yyyy). But the "/d" parameter can be used only one time. How can I do that ? Thanks if you can help me. :) 回答1: This is not an option for that particular command. You could use the selection as input to a FOR loop. Add another indention for each criteria you

How do I handle errors in a batch file that calls sqlplus, because sqlplus doesn't set ERRRORLEVEL on error or failure?

穿精又带淫゛_ 提交于 2020-01-05 08:09:48
问题 i hv a prob here which already took me days to solve it.. my explanation will be quite lengthy but i try to keep it short. in my Oracle SQLdeveloper, i have a package name UT_BETWNSTR which contain: create or replace PACKAGE "UT_BETWNSTR" IS PROCEDURE ut_setup; PROCEDURE ut_teardown; PROCEDURE ut_betwnstr; END UT_BETWNSTR; and the package body is like this: create or replace PACKAGE BODY "UT_BETWNSTR" IS PROCEDURE ut_setup IS BEGIN NULL; END; PROCEDURE ut_teardown IS BEGIN NULL; END;

Increment access time of file

China☆狼群 提交于 2020-01-05 08:05:51
问题 I would like to increment the access time of a file by a given number of hours, e.g. 12 hours. I found a way to hack it using Unxutils touch.exe tool and calculate the new date manually: touch.exe -a -t MMDDhhmmCCYY my_file.txt However, I would like to automatize this without having to enter the new date manually. So here are my questions: How can I retrieve the access time of a file in DOS? How can I increment it? How can I put that together into a script/batch-file? Or are there better