Error “‘git’ is not recognized as an internal or external command”

You may not have set your PATH correctly to point at your Git installation. You need to add the following paths to PATH: C:\Program Files\Git\bin\ C:\Program Files\Git\cmd\ And check that these paths are correct. You may have Git installed on a different drive, or under Program Files (x86). Correct the paths if necessary. Modifying PATH … Read more

How do I remove the process currently using a port on localhost in Windows? [closed]

Step 1: Open up cmd.exe (note: you may need to run it as an administrator, but this isn’t always necessary), then run the below command: netstat -ano | findstr :<PORT> (Replace <PORT> with the port number you want, but keep the colon) The area circled in red shows the PID (process identifier). Locate the PID … Read more

batch file Copy files with certain extensions from multiple directories into one directory

In a batch file solution for /R c:\source %%f in (*.xml) do copy %%f x:\destination\ The code works as such; for each file for in directory c:\source and subdirectories /R that match pattern (\*.xml) put the file name in variable %%f, then for each file do copy file copy %%f to destination x:\\destination\\ Just tested … Read more

How can I move all the files from one folder to another using the command line?

You can use move for this. The documentation from help move states: Moves files and renames files and directories. To move one or more files: MOVE [/Y | /-Y] [drive:][path]filename1[,…] destination To rename a directory: MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2 [drive:][path]filename1 Specifies the location and name of the file or files you want to … Read more

Difference between Dynamic Environment Variables and Normal Environment Variables in CMD

There are three types of variables of which value is accessed using the syntax %variable% or !variable! on having enabled delayed environment variable expansion with using the option EnableDelayedExpansion of the command setlocal from within a Windows command prompt window or a batch file, i.e. using %SystemRoot%\System32\cmd.exe. 1. Persistent stored variables There are environment variables … Read more

How to run Java program in command prompt

javac is the Java compiler. java is the JVM and what you use to execute a Java program. You do not execute .java files, they are just source files. Presumably there is .jar somewhere (or a directory containing .class files) that is the product of building it in Eclipse: java/src/com/mypackage/Main.java java/classes/com/mypackage/Main.class java/lib/mypackage.jar From directory java … Read more

How to answer to prompts automatically with python fabric?

Starting from version 1.9, Fabric includes a way of managing this properly. The section about Prompts in the Fabric documentation says: The prompts dictionary allows users to control interactive prompts. If a key in the dictionary is found in a command’s standard output stream, Fabric will automatically answer with the corresponding dictionary value. You should … Read more

How to add a set path only for that batch file executing?

Just like any other environment variable, with SET: SET PATH=%PATH%;c:\whatever\else If you want to have a little safety check built in first, check to see if the new path exists first: IF EXIST c:\whatever\else SET PATH=%PATH%;c:\whatever\else If you want that to be local to that batch file, use setlocal: setlocal set PATH=… set OTHERTHING=… @REM … Read more