Questions tagged [cmd]

1

votes
1

answer
40

Views

Batch Attributes not on Output

I have a batch file that is taking an inventory of the X drive. Even though I give it attributes, the Excel file created (or even a text file) does not contain any information besides the file name. When I run the same command in the command prompt, it gives me the information I want. How do I cre...
moosebiz
1

votes
1

answer
85

Views

extjs 6 build async loaded scripts

I'm using extjs6 to developing something, some of scripts is async loaded after I click a button to add a tab to tab panel, this scripts did not include in the build directory when I build my app via sencha app build. What way is right when build the application at this situation? any help, thanks.
laofahai
1

votes
1

answer
99

Views

Running php.exe in Windows CLI loop, very slow

I have a php script that needs to run every 6 secs. Since Windows Task Scheduler only allows 1-min interval. So I wrote a task.bat file to start a loop that launch a subtask.bat (which launch the PHP script) on every 6 secs. The task scheduler launch task.bat at every 2 minute. So the launching sequ...
LazNiko
1

votes
0

answer
19

Views

Customizing build process in sencha

I'd like to have a build script showing just warnings and errors and then start up the web server, something like this: sencha app clean then app refresh then app build then web start The problem is that it will start up the web server even if the build fails, and there is a lot of INFO output. Is t...
Buddy
1

votes
1

answer
334

Views

Why is the current time not updated in a FOR loop?

I'm trying to print each file name with a time stamp in batch file. This is my batch script: @echo off setlocal enabledelayedexpansion for /R 'C:\Users\user\Desktop\BdayClip' %%B in (*.*) do ( echo '%time::=-%%%~xG' choice /d y /t 1 > nul ) I'm getting all the files name with the same time stamp and...
Jorden Krowen
1

votes
0

answer
56

Views

How to prevent batch from skipping certain FOR loops?

I'm currently working on a casual game in batch, and I'm running into a slight issue when recovering save data. All the save data is stored in custom INI files (idea from fourth answer here, other code from first answer here). The INI file is first created when the user inputs the name for the save,...
theodosia
1

votes
1

answer
51

Views

Looping this batch syntax

I have a bunch of folders that I have to move to another directory. To do this task I made a .bat. My intention is to select the folders that I want to move and drag on the .bat file. This is working with the following syntax for one folder at a time, what I have to do if I want to do the same with...
Giuseppe Cav
1

votes
0

answer
57

Views

python sometimes recognized sometimes not recognized

I have made an executable from a python script using pyinstaller to check whether a system has python installed or not. Here is the python code: import subprocess subprocess.call('python -V 1> nul 2> zwzwzw.txt' , shell = True) var1 = subprocess.call('find /i 'not recognized' zwzwzw.txt', shell = T...
Sunanda Saha
1

votes
0

answer
35

Views

use Lib.cmd to give commands while logging to stdout

I'm fairly new to python. Now I wrote a python program that does A) background checks in one thread, and logs the result of it with logging to stdout. And B) also has a Lib.cmd running in a loop to give the program commands. import logging from cmd import Cmd class TPrompt(Cmd): def do_config(sel...
Aart
1

votes
1

answer
53

Views

Windows: is it possible access window 'git bash' or 'ConEmu' via ssh?

I'm using Windows7 desktop and installed ssh to access this Windows7 desktop remotely. In Windows7 environment, I use ConEmu or git bash, which makes Window7env similar with Linux. The Problem is that when I access this Windows 7 via ssh, it shows cmd pane. Is there any way to show git bash or ConE...
user3595632
1

votes
3

answer
930

Views

How to skip a command in batch

I am running a simple batch script to start 2 programs. How do I have added a line which checks if the program is running. How can I then skip the startup of the program and move onto the next line. @echo off tasklist /FI 'IMAGENAME eq Test123.exe' 2>NUL | find /I /N 'Test123.exe'>NUL if '%ERRORLEVE...
NETGEAR R6220
1

votes
1

answer
23

Views

Read highest foldername with batch

I'm desperately trying to read the highest foldername to create 10 new folders with consecutive names. The folders have numbers as names e.g. 1234,1235,1236. SET datei=0 FOR /D %%a IN (*) DO ( ECHO %datei% IF %%a GTR %datei% SET datei=%%a ) ECHO %datei% The output is 0 0 0 1234 not what i expected,...
Noriyuki
1

votes
0

answer
315

Views

Laravel Artisan Commands - No Colors In CMD Terminal

I'm using windows 10, Laravel 5.2 and php artisan commands are displaying ansi color code characters instead of the color itself. Below is an example of php artisan --version: ?[32mLaravel Framework?[39m version ?[33m5.2.45?[39m I don't see this problem with composer or git commands in terminal....
pliu
1

votes
3

answer
1.4k

Views

cmd/ batch command to make windows FULL FULL SCREEN

I'm just wondering if there is a cmd/batch command out there to make a file full screen. I'm not just talking about maximized I'm talking about like full screen like when you are playing a game. I know that /max makes the program maximized not FULL screen. If you do not know what I mean just hit F...
jish Bailey
1

votes
1

answer
184

Views

How to simultaneously start 2 commands in .bat file at two different paths?

I have two directories with programs I want to run simultanously: C:\ProgramA\startA.bat C:\ProgramB\startB.bat How can I have a single bat file that simultaneously run both commands? Note that they should be asynchronous as startA will not 'end' and startB does not end either. They output text in t...
Rolando
1

votes
2

answer
1.9k

Views

How can I create an input prompt for batch file using taskkill

UPDATE: Ok below is the current code I wrote up but it errors out saying ERROR: The RPC server is unavailable If I manually just type in taskkill /s cn /im csmmviewer.exe within cmd it works, what I'm I missing here? @echo off :start set /p 'cn=Enter the computer name ' echo. set /p 'question=You wi...
Cristian Luzbet
1

votes
1

answer
110

Views

Trying to implement getopt in BATCH, with flagged arguments first and other arguments last

I'm trying to handle my script's command line arguments more elegantly. I really like the way getopt handles arguments in C, but at this point in my script it's not worth rewriting it in a new language. I came across this thread: https://stackoverflow.com/a/3661082, that included this method that I...
Robert Ellegate
1

votes
1

answer
28

Views

Wierd problems when insert Chines characters into MySQL via Windows cmd

My Envirionment System: Windows 7 64-bit Database: MySQL 5.7.20 64-bit Locale: Chinese cmd code page: CP936 MySQL setting system variables: enter image description here table info: enter image description here My Problem Under the environment and db setting described above, I tried to insert an reco...
shawnwinder
1

votes
1

answer
2.2k

Views

SC - ChangeServiceConfig Failed 5: on cmd

I want to stop the service run automatically when system boots. For specific information, I'm logged in with 'administrator' account. And opened cmd with 'run as administrator' here's the log on cmd. C:\>sc config AppIDSvc start= auto [SC] ChangeServiceConfig SUCCESS C:\>sc config AppIDSvc start= de...
Pandol
1

votes
1

answer
90

Views

get error code from called devenv.exe in jenkins pipeline

I just try to erase all Freestyle Jobs from our Jenkins Server. Therefore I call our VS builds directly from the Pipeline job: bat '''chcp 1252 & 'PATHTOVS\\devenv.com' /rebuild Release^|$buildBranch $WORKSPACE\\SOLUTION.sln >> ${buildBranch}_$CPNUM_PARAM.txt''' Now I am wondering how to differenti...
Rod Kimble
1

votes
1

answer
282

Views

Change permission of all files with specific extension in a folder and subfolders using CMD

How to change permission of all files with extension .pyc in a folder and its sub-folder? individually it will be like this: c:\folder1> cacls *.pyc /P everyone:F c:\folder1\a> cacls *.pyc /P everyone:F c:\folder1\b> cacls *.pyc /P everyone:F and so on.
Giant Mirchu
1

votes
1

answer
56

Views

How to move a long list of files to other directories?

I have a *.txt file that consist of a very long list of files (about 30k) to be moved and where each line contains the file name of the file to move with full path and the target folder with full path separated by the string  to . List file example: C:\USER\BDG\anto\12.jpg to D:\USER\BDG\, C:\USE...
Robin Gui
1

votes
0

answer
60

Views

Issue running sencha application on mobile as a native app

I see nothing when i load my application in android device even after the native build works fine Steps I used: Run sencha production build //works fine Check the application in production env //works fine initialize the application with cordova for first time //works fine Once cordova project is cr...
parv kothari
1

votes
0

answer
25

Views

Python can't access cmd when using CX_FREEZE

After I build my script using CX_FREEZE I can't get anything to print. Tried using shell : cmd ='echo %s'% a call(cmd, shell=True) But that didn't worked either. Is there another way to open CMD and print something after building. I'm using 3.6 python and using 32 bit.
Sande
1

votes
0

answer
277

Views

how to create a flask web service when asp.net as the frontend

I have built a web application using asp.net. and created a web service using command prompt process-System.Diagnostics.process usually ill get the values from the user then pass it to the server's cmd prompt, this will run the python script using the given values as python script parameters. As it...
chandru
1

votes
0

answer
214

Views

FFmpeg stops encoding after x minutes when using Mjpeg

I'm using ffmpeg in a node application with this command: ffmpeg -seekable 0 -i http://127.0.0.1:8100/Mjpeg/1?authToken=xxx -video_size 1280x720 -r 30 -pix_fmt yuv420p -y D:\Video\pflyers\test.mp4 The encoding would stop after 28:53 every time. After some reading I figured I had to spawn the child i...
Rune Aspvik
1

votes
2

answer
504

Views

Opening .xlsm files not opening via .bat file (cmd prompt)

I recently started experiencing an issue with a series of .bat files I schedule to open via the 'Task Scheduler' in Windows 10. These tasks and batch files were working perfectly for over a year and now they are giving me fits. Here is the code in the batch file which I created in Notepad and saved...
Jon
1

votes
0

answer
467

Views

Why does the assoc command in cmd doesn't change the program that opens a file with the specified extension?

I have tried a lot, but the assoc command doesn't work for me. When I type assoc .html=txtfile the command seems to have been executed as expected. When I check the extension and the associations the .html association has changed to txtfile. But normally it should mean, that the .html files are op...
TheProgrammer
1

votes
0

answer
342

Views

Is there an equivalent of the bash source command in Windows CMD?

I tried the command call, but it runs another instance of the CMD shell attached to a new console. Is there a way to execute the commands from the other file in the current CMD shell?
cibin
1

votes
1

answer
517

Views

WMI get certification authorities list

I try to write 2 WMIC commands for generate list of all installed applications on mashine and another one all certificates and write it to file. A problem is that my certificate command does not work properly. the second command returns the same file with installed aplications apart installed certi...
Андрей Ка
1

votes
1

answer
45

Views

The value of my score calculating variable increases abnormally

Programmed a space invader-ish type game in C. Everything runs smoothly except sometimes the value of 'score'(to keep tabs on score which increase every time an invader dies) increments hundreds of thousand times randomly. Can't figure out why. Full code in case someone needs it Cmd space invaders v...
Redcoat
1

votes
1

answer
360

Views

Batch script - close Cmd.exe window and restart

I have a batch file script which starts a program (bat) and after X seconds the batch script is close the program (exe) and restart it. This is my code: :loop start '1.bat' 'C:\1\1.bat' Timeout 10 taskkill /f /im program.exe goto loop If the program is ending, I want that the Cmd.exe window closes,...
Abrapata
1

votes
1

answer
1.4k

Views

'.' is not recognized as an internal or external command windows 10

after compiling files using gcc on windows 10 while executing using ./a.out says '.' not recognised. I have already set gcc path in environment
DIVANSHU GUPTA
1

votes
1

answer
408

Views

Windows console “ESC[2J” doesn't really “clear” the screen

I know this kind of questions are asked frequently, but I think this one is a little different and needed to be asked. The new Windows console supports ANSI (VT100) control codes: ANSI/VT100 control codes & Windows document: the control codes. However, ESC[2J doesn't really 'clear' the screen, it ju...
KirkSu
1

votes
1

answer
40

Views

Start subsequent cmd windows in background

Lets say I have 4 .cmd files: 1.cmd, 2.cmd, 3.cmd and 4.cmd I am allowed to modify only 1.cmd; 1.cmd starts 2.cmd; 2.cmd starts 3.cmd, 2.cmd does some other things then, 2.cmd starts 4.cmd Is there a way to tell the subsequent .cmd files start in background, from 1.cmd? Mention: all .cmd files ha...
RRG
1

votes
0

answer
162

Views

Acquire process ID of a CMD shell opened with 'subprocess.Popen'

I am using subprocess.Popen in order to run some executable from the CMD shell: p = subprocess.Popen('cmd /c start app.exe') I am having problems closing the console window when killing CMD via p.terminate(). If I do it right away, then the console window doesn't even open. If I do it after some tim...
goodvibration
1

votes
1

answer
122

Views

CMD log to file not working for Geth.exe

I'm using the below code to log output of a cmd call to a file however it's not working at times. System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnost...
JD_
1

votes
1

answer
36

Views

How to obtain a list of direct descendants (directories and files) of the current directory with their attributes?

There is a directory (denoted by drctr). It contains a number of direct descendants (denoted by drctr_1, drctr_2, file_1, file_2 etc. ). Then drctr_1 contains a number of its direct descendants (denoted by drctr_1_1, drctr_1_2, file_1_1, file_1_2 etc. ). Question: given drctr, is it possible to ob...
lyrically wicked
1

votes
1

answer
113

Views

Django cmd color output with colorama

colorama allows colored text output in cmd for python. And it's working. import colorama colorama.init() print('[31mThis outputs red text![39m') And we can set color output for django runserver by setting environment var in cmd with set DJANGO_COLORS=light. I added import colorama and colorama.init(...
Stas Shepelev
1

votes
3

answer
245

Views

error: bad operand types for binary operator '=='

Just wanted to do a task in my Book but I don't get why this is wrong.It should say that negative Numbers aren't positive and positive aren0t negative with a Boolean. This is my Code: import javax.swing.JOptionPane; public class Zahlentest { public static void main(String[] args) { String eingabe; c...
Julian Queisser

View additional questions