Questions tagged [cmd]

1

votes
3

answer
320

Views

how to exit “python manage.py runserver” in windows

How can I exit from the command line after executing: python manage.py run server 8080 I already tried Ctrl+C and Ctrl+Z but neither worked. Using gitbash instead of cmd changed nothing. I am using Windows (64 bit).
Jesse Luo
1

votes
2

answer
648

Views

Python Programatically Change Console font size

I found the code below which is supposed to programatically change the console font size. I'm on Windows 10. However, whatever values I tweak, I can't seem to get any control over the font size, and also for some reason the console which gets opened when I run this script is very wide. I have no ide...
Robin
1

votes
2

answer
55

Views

Escaping command correctly for powershell.exe (launch command from CMD.exe)

How do I escape properly the below command? I need to run the powershell command from CMD because it's a stubpath value. The registry value for stubpath can't run powershell commands natively. The command is verified and works correctly. The problem is only to get it to run via powershell.exe -comma...
Rakha
1

votes
2

answer
72

Views

Why doesn't my batch file work in Windows CE?

My script is not executing on Windows CE version 8. I am getting a file path from the user as input, appending the filename and attempting to 'start' it. But the @ echo off isn't considered and all commands are shown in the console when runing in the device. Also, none of the start commands nor the...
Kumaravel Rajan
1

votes
2

answer
55

Views

Count the number of newlines (both Unix and Windows)

I have a text file and want to write a batch file to verify that it only contains one line with a specific content without any newline at the end of said line. Comparing the content of the line is not difficult, as I can just read it into a variable and then compare it to what I expect. My problem i...
jotasi
0

votes
0

answer
4

Views

The system cannot find the path specified. when running cd code\restrr command in cmd. What should I do?

C:\Users\Dlab-1>cd code\restrr The system cannot find the path specified. (cd code\restrr command in cmd) What should I do? Please help. Thanks in advance
Yen Doe
0

votes
1

answer
9

Views

How to get python to read and type things in windows CMD

I am writing a program that needs to know whether or not it's in a virtual machine, a neat way I found was to check the system information in the cmd, however, I can't find a way to write in the cmd and read what the cmd replies. I would like something that can write 'WMIC COMPUTERSYSTEM GET MANUFAC...
Some_dude
1

votes
4

answer
2.5k

Views

How to use ELSE statement in .bat file that has multiple IF statements? [duplicate]

This question is an exact duplicate of: How to use an If Statement in .bat file to run one of Multiple options [duplicate] I'm writing a Windows batch file to enable, disable or make manual a Windows Service. How would you use an ELSE statement if you have multiple IF options? For example: if /I '%c...
Thelps
1

votes
2

answer
134

Views

Reading data from CSV File and Inserting it into Database

I have a requirement to read the data from a csv file and populate it into the database. I am using the bcp commandline utility for this purpose. My CSV File look like this: First_name,Last_name,EmpID,company,languages 'Jack','Thomas','57616','IBM','C C++ JAVA COBOL PERL SQL ' 'Tim','Cook','10001',...
Abhishek Pandey
1

votes
2

answer
52

Views

Passing directory paths as strings to argparse in Python

Scenario: I have a python script that receives as inputs 2 directory paths (input and output folders) and a variable ID. With these, it performs a data gathering procedure from xlsx and xlsm macros, modifies the data and saves to a csv (from the input folder, the inner functions of the code will run...
DGMS89
1

votes
1

answer
32

Views

Can Cmd determine path location of a .exe or other file type?

I think the best way to ask my question is by giving an example. This is a question about environmental/user variables. I am using windows system. I have the environmental variable: C:\Program Files\Anaconda3\Scripts I have a file: C:\Program Files\Anaconda3\Scripts\conda.exe typing 'conda' into cmd...
JimmyWilliams
1

votes
1

answer
42

Views

Maven not running tests from command line

I am trying to run one project from cmd line using mvn test. It shows build success but not running any tests as it shows test runs:0. I have tried all the suggestions provided in stackoverflow but still its not running. Please let me know what i am missing here. My Maven Project: Command line Resul...
Jagadish Dabbiru
1

votes
2

answer
63

Views

Excel VBA CMD to List Directory Contents

How would I modify this Excel VBA to: List the paths of the directories and not just the files? Filter out system and hidden files? Here is the the current VBA: Sub MM() Dim fResults As Variant fResults = GetFiles('C:\Temp') Range('A1').Resize(UBound(fResults) + 1, 1).Value = _ WorksheetFunction.Tr...
BadDogTitan
1

votes
2

answer
4.2k

Views

Obtain the command line from a running process from the Command Prompt [closed]

I wanted to determine the command-line arguments of a running process at the Command Prompt (cmd.exe). E.g., if I started my abc.exe program as follows: abc -d I want to determine the whole command line later. The TASKLIST utility does not provide this info, because it just reports the exe name and...
Deepak
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

View additional questions