cmd

How to get only file name in 'for' batch command and not file extension

孤街醉人 提交于 2021-01-28 20:34:15
问题 When using this code to upload video's to YouTube, the title that gets named has the file extension at the end (in this case .mp4) for %%f in (*.mp4) do python --file="%%f" --title="%%f" 回答1: use for %%f in (*.csv) do echo "%%~nf" for more info do a for /? .. this is the part that you would liek to see In addition, substitution of FOR variable references has been enhanced. You can now use the following optional syntax: %~I - expands %I removing any surrounding quotes (") %~fI - expands %I to

How to open a specific CANoe configuration through command prompt without using VB scripts?

左心房为你撑大大i 提交于 2021-01-28 14:22:47
问题 Is there any possibility to open a specific CANoe configuration through command prompt? I tried opening a configuration like sample.cfg through command prompt by using the command: C:\Users\Downloads\Sample>CANoe64 sample.cfg With this command, I am able to start the CANoe application, but not with the specified configuration. CANoe application gets started with the default configuration. 回答1: You can simply mention C:\Users\Downloads\Sample>sample.cfg This will open the configuration in the

How to open a specific CANoe configuration through command prompt without using VB scripts?

梦想与她 提交于 2021-01-28 14:20:50
问题 Is there any possibility to open a specific CANoe configuration through command prompt? I tried opening a configuration like sample.cfg through command prompt by using the command: C:\Users\Downloads\Sample>CANoe64 sample.cfg With this command, I am able to start the CANoe application, but not with the specified configuration. CANoe application gets started with the default configuration. 回答1: You can simply mention C:\Users\Downloads\Sample>sample.cfg This will open the configuration in the

Override Windows environment variable value?

帅比萌擦擦* 提交于 2021-01-28 12:37:24
问题 I want to permanently change the value of the "Username" variable of Windows to fix a problem of my Windows 8 with the user profile folder name. I've tried to set a new environment variable using SETX tool like this: SETX /M Username "value" ...The new variable is generated, I can see it in the registry with the other variables, but is not overrided 'cause if I try to display the value of Username variable the it displays the old value. Is it possibly to do what I want? 回答1: CMD reads the

WiFi Password with Command Prompt windows 8.1

冷暖自知 提交于 2021-01-28 12:23:53
问题 I used this command to get connected WiFi password: netsh wlan show profile name="my profile name" key=clear but it doesn't show security key, it says: key content = absent Is there still any way to get it? why is it absent? 回答1: From Help netsh wlan show profile /? If key is set to "clear" and the caller is local administrator, the key will be shown in plain text. 回答2: You can use this batch file to get all of the ssid's and passwords from your system. Copy and paste the code below into

Copy Files /w Spaces In Name

不问归期 提交于 2021-01-28 08:38:17
问题 My code is SET usb="%CD%\Dokument\%USERNAME%\" mkdir %usb% for /R "C:\Users\%USERNAME%\" %%f in (*.docx) do copy %%f %CD%\Document\%USERNAME%\ and it works, but not for files (.docx) with spaces in their name. I've tried fixing it with quotes, and different code styles/methods, but can't solve it. (I'm new to DOS). How can I solve this? Or is there a better code to copy all the files with .docx extension from a computer to another directory/usb? 回答1: You need to quote file paths containing

How to make the console font bigger when running a batch?

自闭症网瘾萝莉.ら 提交于 2021-01-28 08:09:51
问题 I have the following batch file which I use to run my Minecraft server: (run.bat) @echo off java -Xmx1G -jar mcserver.jar I looked on many forums, and I'm too lazy to begin studying batch code, so I decided to ask here. I want to insert a passage of code that will set the font size in the console to a certain size (for example, 18px). BUT: I don't want the console to run with big font on every other batch file or cmd prompt opened... only in this file. I appreciate any answers :) I use

Run CMD Minimized/Hidden [closed]

ぐ巨炮叔叔 提交于 2021-01-28 08:05:47
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 months ago . Improve this question I use the following code to execute a command line executable. It does work, but it opens to a CMD window that is full size and blocks the form that I use to call it. Over our VPN, this may take a considerable amount of time and I would like to have it minimized or hidden to

Set and Limit file type association within the scope of a cmd shell

你。 提交于 2021-01-28 07:05:10
问题 On Windows, is there a way to create a cmd shell and set certain file type associations within it's scope and not affect system-wide file association. I'd like to launch a .bat file to open a shell with it's own defined file type association.... Something like this pseudo .bat file: [my_shell.bat] @echo off ~ASSOCIATE .jpg --> Google Image Viewer.exe ~ASSOCIATE .tga --> Adobe Photoshop ~ASSOCIATE .txt --> Komodo Edit start cmd And so, for example, any .txt file i'd open from the resulting

Using wildcard for files with jq on Windows

北战南征 提交于 2021-01-28 05:31:01
问题 I am using jq 1.6 on Windows 8.1 and facing same issue as reported here https://github.com/stedolan/jq/issues/1644 Command as simple as jq . *.json is failing with following error: Assertion failed! Program: jq.exe File: src/main.c, Line 256 Expression: wargc == argc This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Does anyone have solution to this? What is the correct way to use jq with all the