r/cmd • • Jul 28 '21

HELP PLS

0 Upvotes

Hello im trying to make a program using cmd but every time i try to put something like "ipconfig" and press enter my CMD closes.... how do i fix it??


r/cmd • • Nov 09 '20

Beginner

0 Upvotes

Hello to anyone who is reading this. I have just started learning java programming, and we are doing some exercises in the command prompt. So this is my call for help to someone that has experience if you could take from 10 to 30 min of your time to give me some pointers or write me some examples I would be most grateful. For I have tried youtube tutorials but I'm having trouble with finding that exact piece of code that I need.

The stuff that I'm using r now: XAMPP, DBeaver, and Visual Studio Code + CMD. PM me for further details, please. Voice chat would be helpful

Thank you for your time, Whistler.


r/cmd • • Nov 30 '20

File problem

0 Upvotes

I know how I can open a file with cmd, but I have a problem... On my file path is a blank space and I know, That if there is a Space, the Programm can’t read further so it says that it can’t find the file. How can I make a blank space? I tried to make it with underscore, but it didn’t work either. Now I’m confused. Please help me


r/cmd • • Mar 19 '23

Hi i need help with windows update after a command

0 Upvotes

I needed to install adobe and saw a tutorial for a full one, the video told me to use this -inputformat none -outputformat none -noninteractive -command add-mppreference -exclusion path c:
now i can´t use windows update nor microsoft store and so on, can someone help me please, thank you very much


r/cmd • • Nov 04 '22

Run .bat file as Administrator

0 Upvotes

How do you guys run a batch file as Administrator? I want to code in the batch file so it runs as administrator when it is run. I don't want to do any work manually like creating a shortcut or going to its properties.

If I type the batch file's path in RUN, it should just execute it as Admin.


r/cmd • • Jun 14 '20

batch file for super hidden file toggle?

1 Upvotes

Would someone be able to tell me, or explain how to make a .bat file to toggle on and off the super hidden file attribute of a specific folder?

Basically I would like to be able to hide a .bat file somewhere that I can use to hide or un-hide a folder and its files, for reasons... lol

I've found this already but I'm not sure how to make this code into what I'm looking for. ( attrib +s +h “C:\Users\JOHN DOE\Desktop\FILE NAME” ) and ( attrib -s -h “C:\Users\Taylor Gibb\Desktop\Top Secret” )

Thanks a ton!!!


r/cmd • • Apr 29 '20

How do I send a .bat file?

1 Upvotes

r/cmd • • Feb 25 '21

How to use cmd?

1 Upvotes

I want to learn how to property use windows comand line, but i cant find any good tutorial or manual, so i want to ask if someone can recomend me something like this?

Of course i know 'HELP' comand, but usig it looking like kind of masochism. At least for beginer


r/cmd • • Apr 28 '21

Question

0 Upvotes

Can you make cmd know when you are on incognito mode?


r/cmd • • Jun 03 '20

How do I install a program in cmd?

2 Upvotes

r/cmd • • Jul 14 '19

Hacking school system.. | please tell if different sub

3 Upvotes

Yeah, so I hacked my school system.. What I did is I put a computer into repair mode then renamed Utilman to cmd and cmd to Utilman. This meant that when I click the ease of access button it opened up cmd and because I wasn't signed into any account it put me as the computer which has whole control.

Ok, so what I want to do is have an admin account that can basically download anything. using cmd I was able to enable the default Admin account. I got into the account but there was only one problem This admin account signs into a specific domain eg: pc 2344567 To download I had to put in admin account with my school's domain eg:"notmyactualschool" so what I want to know Is either how to set the download button to a different domain of how to create an admin account with my notmyactualschool domain. I've tried to make admin account but they don't work only the one with the specific domain seems to work.


r/cmd • • Jul 04 '21

So bored I figured out how to watch Star Wars on cmd 50 likes and I will watch the entire episode

Thumbnail
gallery
11 Upvotes

r/cmd • • May 28 '19

Wifi password

2 Upvotes

Hello I want to know our school wifi password. But I cannot click on show symbols because of admin password. Is it possible to find admin password or wifi password? (I don't wanna detele Apass)


r/cmd • • Jul 02 '21

How do I run a command in cmd.exe from a bash/.sh script?

1 Upvotes

I have an (intel) Mac, and these are basically internally Linux (well, BSD);

I want to:

  1. write a bash script (eg. myScript.sh)

  2. spawn CMD.EXE from it, with some pre-entered text to appear in it (eg. 'C:\> make.exe /compile /a /b /c srcidr/thingo'

  3. Run this pre-entered command

  4. CMD.EXE will quit when it's done, and it's back to the spawning .sh script again, which will continue along it's way.

The bash script is in its own environment - it's sits on the Host Mac.

Windows is the Guest system, running in 'Coherence Mode' in Mac, using Parallels 16. I can restart it, change memory allocated to it, etc. as I please.

Also please understand: this is NOT a copy of Cygwin; I do NOT want to run a bash interpreter in Windows; quite the opposite, I want to spawn cmd, in Mac, via bash script.

Is this possible?


r/cmd • • Jul 03 '21

If condition syntax issues

2 Upvotes

Hi,

I am absolutely new to cmd and pretty confused by the syntax especially at if-conditions. I have two variables both strings but I just cannot compare the two of them. So far I have tried almost everything I could find but I still get syntax-errors about my variables...

set test="Succeed"

set /p compare=<C:\Windows\temp\String.txt

if [ $test = $compare ];

then

echo "success"

else

echo "fail"

fi

That's it... if you have any idea please help


r/cmd • • Aug 05 '21

Is it possible to execute a python program with cmd using another drive?

1 Upvotes

My primary drive SSD doesn't have enough memory to execute the python program, so I'm looking for a way to execute it on my HDD secondary drive, without transferring py.exe.

Potentially something like $ python3 main.py d/ D:

Any ideas?


r/cmd • • Jul 30 '21

What does this do?

2 Upvotes
@ECHO OFF
SET LXDISTRO=MyWSL2vm & SET WSL2PORT=3399 & SET HOSTPORT=3398
NETSH INTERFACE PORTPROXY RESET & NETSH AdvFirewall Firewall delete rule name="%LXDISTRO% Port Forward" > NUL
WSL -d %LXDISTRO% -- ip addr show eth0 ^| grep -oP '(?^<=inet\s)\d+(\.\d+){3}' > IP.TMP
SET /p IP=<IP.TMP
NETSH INTERFACE PORTPROXY ADD v4tov4 listenport=%HOSTPORT% listenaddress=0.0.0.0 connectport=%WSL2PORT% connectaddress=%IP% 
NETSH AdvFirewall Firewall add rule name="%LXDISTRO% Port Forward" dir=in action=allow protocol=TCP localport=%HOSTPORT% > NUL
ECHO WSL2 Virtual Machine %IP%:%WSL2PORT%now accepting traffic on %COMPUTERNAME%:%HOSTPORT%

I used it to be able to access the website I was running on docker on my browser, but I am wondering what exactly it does.


r/cmd • • Oct 29 '18

CMD batch file code checker

Thumbnail robvanderwoude.com
1 Upvotes

r/cmd • • Jul 16 '19

Multiple Questions

1 Upvotes
  1. How do you copy a file that starts in a certain letter to another directory?(ex. iIwant to find all files inside a directory that start with the letter q)

  2. How do you find files in a certain file format (ex.docx)

  3. How do I change a path to include all subdirectories

  4. How do I make a file inside a subdirectory without going away from the root drive (ex.I want to make a txt file inside another directory without moving away from D:


r/cmd • • Feb 08 '19

Copy All Users Normal.dotm From AppData to C:\Temp

2 Upvotes

Hello - n00b here. I'm trying to copy all user's "normal.dotm" from C:\Users%username%\AppData\Roaming\Microsoft\Templates and put them in C:\Temp%username%. I have tried robocopy, xcopy, and for /r (See below for details). Any help is appreciated!

robocopy C:\Users\ C:\Temp /s /xj *normal.dotm

  • Endless loop. Folder redirect from C:\Users%username%\Application data.

robocopy C:\Users%username%\AppData\Roaming\Microsoft\Templates. C:\Temp%username% /s /create

  • Only copies for userid that was running cmd. Also tried via psexec, same result.

for /r "C:\Users\ %x in (*.dotm) do copy "%x" "C:\Temp"

  • Replaces file

for /r "C:\Users" %x in (*.dotm) do robocopy "%x" "C:\Temp" /s

  • Robocopy "Error 123 (0x1111117B) Accessing Source Directory. The filename, directory name, or volume label syntax is incorrect."

Thanks in advance!


r/cmd • • Jan 23 '20

Is there a command to stop any process that's currently accessing a file?

1 Upvotes

I'm trying to access a certain file through command, but it returns "The process cannot access the file because it is being used by another process" or sometimes "access is denied"

Is there a way to get around this?


r/cmd • • Jul 08 '19

avoiding the error “0x80070050: The file exists” when moving files into Recycle bin

2 Upvotes

Hello

I'm deleting a lot of files (around one million) on windows server 2012 via cmd.
I want them to go to the recycle bin, so I'm not using the del command, but the recycle.exe of CmdUtils.
The problem is that sometimes cmd stops with the message:

An unexpected error is keeping you from deleting the file. If you continue to receive this error you can use the error code to search for help with this problem.

Error 0x80070050: The file exists. 

and then I can choose among 'Try again' 'Skip' 'Cancel'

On CmdUtils/Recycle it seems I have only the -f option for avoiding the deleting confirmation message, but it doesn't work with the error I'm getting. I've tried to contact CmdUtils developer, but no reply.

So, does anyone know another way for moving file into Recycle bin with the chance of automatically answer "Try again" to that popup?

Thanks.


r/cmd • • Sep 19 '19

[HELP] How do you save the configuration for the colors for both the background text and screen text for cmd shortcut (.ink) so the theme can be saved and I don't need to change it every second I open it?

1 Upvotes

Everytime I change it, en error that says "Unable to modify the shortcut: C:\User\<My_User_Name>\Desktop\cmd.exe.Ink. Check to make sure it has not been deleted or renamed." pops up.

If it helps, here are the information of it:

Target: %windir%\system32\cmd.exe

Start in:%HOMEDRIVE%%HOMEPATH%


r/cmd • • Jul 05 '20

How to get the size of files or folders and convert to .txt files?

5 Upvotes

Hi, I have a list of 100+ folders inside a directory, I already know how to list the names of every folder and convert it to a .txt files.

Now I want to do it with their files sizes, is there a way to do that in CMD? my desired output would look something like on the below.

14.00gb

12.32gb

843mb

36.93gb

and so on.

Thanks in advance, hoping someone can figure this out. Thanks.


r/cmd • • Jul 27 '20

Check for errors in consecutive number filenames

2 Upvotes

Hi all! I don't know if this is the right place to ask this question, but here it goes:

I have huge batches of files that have a consecutive number filename, e.g FP_0000001, FP_0000002 and so on, up to FP_0005678, for example.

The thing is, sometimes I have, for example, from FP_0000001 to FP_0000356 in one folder, but when I check the number of files in the folder, it will say I have only 290 files. So I know there are some files missing, but I don't know exactly which ones.

So, I'm in need of some tool that checks the consecutiveness (?) of the numbers in the filename and then list the ones that are missing

Is this possible using cmd?

Thanks in advance for your help! Hope I made myself clear. English is not my mother tongue