batch-file

cmd.exe throws error “& was unexpected at this time.”

六眼飞鱼酱① 提交于 2021-02-19 04:13:06
问题 so my problem is that when i just ran cmd.exe in terminal, i get "& was unexpected at this time." Error at the end - looks like this So the problem is that i'm getting erros in Unity 3D when it wants to run the unity_csc.bat file and compile solution. These errors are exactly the same as the one when i just run cmd.exe - therefore i suspect its not an Unity3D based problem (if you want you can check the Unity3D specific thread here https://forum.unity.com/threads/2-empty-errors-in-console-was

Oracle 11g - run windows batch file to run multiple sql files in sqlplus

陌路散爱 提交于 2021-02-19 04:02:37
问题 I would like to use a single batch file to execute multiple sql in a sequence.. IE: sql2 script calls a table created by sql1 script.. etc.. here is the batch code I have so far.. it works to run a single sql file but I need it to run the first one and then then next.. thanks in advance. @ECHO OFF echo. echo. SET /P uname=Username: echo. echo. SET /P pass=Password: echo. echo. SET /P mydatabase=Database: echo. echo. set oracle_sid=ins sqlplus -s %uname%/%pass%@%mydatabase% @J:/A/scripts/

Execute batch file in Powershell

為{幸葍}努か 提交于 2021-02-19 04:01:35
问题 I want to execute the following from a batch file: "C:\OpenCover\tools\OpenCover.Console.exe" -register:user -target:"%VS110COMNTOOLS%..\IDE\mstest.exe" -targetargs:"/testcontainer:\"C:\Develop\bin\Debug\MyUnitTests.dll\" ... " PAUSE Now I would like to log the output of the process to a file for which I came across the quite handy powershell usage of powershell "dir | tee output.log" but this does not take my batch file as first argument ( powershell "my.bat | tee output.log" ) because it is

Loop until file exists using windows batch command

女生的网名这么多〃 提交于 2021-02-18 05:14:42
问题 how can i convert following code into windows batch command? Here is a perl script which is searching for a file in a while loop, if found it Exits. use strict; use warnings; my $filename = 'something.txt'; while (1) { if (-e $filename) { print "File Exists!"; exit; } } 回答1: This is a fairly straight-forward translation. The code should be pretty self-explanatory: @ECHO OFF SET LookForFile="C:\Path\To\File.txt" :CheckForFile IF EXIST %LookForFile% GOTO FoundIt REM If we get here, the file is

Mapping a network drive and having trouble saving password

余生长醉 提交于 2021-02-18 05:07:07
问题 I'm running a batch: "net use j: \\192.168.1.241\sausb /user:srvfeskar\administrator Ratata12 /persistent:yes /p:yes" After restarting the windows 8 computer. I need to insert the password again. 回答1: If i understand it, you are not running the same command each time after restart. You want to run the command once and then in sucessive logins have the drive mapped without having to validate. There are two options In net use j: command include the /persistent:yes and /savecred switches, but do

Mapping a network drive and having trouble saving password

Deadly 提交于 2021-02-18 05:07:03
问题 I'm running a batch: "net use j: \\192.168.1.241\sausb /user:srvfeskar\administrator Ratata12 /persistent:yes /p:yes" After restarting the windows 8 computer. I need to insert the password again. 回答1: If i understand it, you are not running the same command each time after restart. You want to run the command once and then in sucessive logins have the drive mapped without having to validate. There are two options In net use j: command include the /persistent:yes and /savecred switches, but do

Mapping a network drive and having trouble saving password

感情迁移 提交于 2021-02-18 05:05:19
问题 I'm running a batch: "net use j: \\192.168.1.241\sausb /user:srvfeskar\administrator Ratata12 /persistent:yes /p:yes" After restarting the windows 8 computer. I need to insert the password again. 回答1: If i understand it, you are not running the same command each time after restart. You want to run the command once and then in sucessive logins have the drive mapped without having to validate. There are two options In net use j: command include the /persistent:yes and /savecred switches, but do

pass parameter from jenkins parameterized build to windows batch command

我与影子孤独终老i 提交于 2021-02-17 21:29:52
问题 I am starting to use Jenkins, which is a really great tool. We are using parameterized build, we define parameter such as branch name ${Branch} (e.g. dev, release, main etc). In the build config, I can add a windows batch command, is there a way I can pass down these parameters to the batch command? I tried to pass like "%${Branch}%" or "%Branch%", but seems not working. Can anyone help? Many Thanks 回答1: Using Parameterized Build , you need to define parameters. The value of these will be

pass parameter from jenkins parameterized build to windows batch command

Deadly 提交于 2021-02-17 21:26:33
问题 I am starting to use Jenkins, which is a really great tool. We are using parameterized build, we define parameter such as branch name ${Branch} (e.g. dev, release, main etc). In the build config, I can add a windows batch command, is there a way I can pass down these parameters to the batch command? I tried to pass like "%${Branch}%" or "%Branch%", but seems not working. Can anyone help? Many Thanks 回答1: Using Parameterized Build , you need to define parameters. The value of these will be

Cant loop over files with spaces in the filename, windows batch file and image magick

百般思念 提交于 2021-02-17 06:18:03
问题 I'm trying to loop over a bunch of folders, create subfolders then loop on the files, convert them with imagemagick and put them into the new subfolders and rename them. Some files have spaces in their name and cause the error... How can I fix this? error message : convert: unable to open image 'photo': No such name or directory @error/blob.c/OpenBlob/3489. convert: no decode delegate for this image format '' @ error/constitute.c/ReadImage/554.** The Folder Structure looks like this... The