This fascinating post: How is this command legal ? "> file1 < file2 cat" highlights surprising behavior in a seemingly malformed cat call to "the shell" (a Linux shell, presumably BASH). Basically, shells seem to be able to grab
I have a command like this: set /p txtfile=Write destination to the .txt file: now i need to know if the file really exists so: if exist %txtfile% echo file found. it works, but if the user writes me C:\ it will display "file found" to. I want t
I would like to import data in the file 'c:_value_.txt' to my database like this Bcp mydb.mytable in 'C:\_value_.txt' -T -c -Smypc\instancename However I keep getting the error Unable to open BCP host data -file Why is this?Lose the single quotes aro
I have an external process which essentially needs to call: int myInt = exec('find /v /c "" filepath'); It's counting the number of lines in a text file. If there's a better way to get the integer amount that'd also work great. With find, the fu
I wrote this game. it simply sets a random number between 1 and 16 and the user must guess it. when the guess was correct, it shows the attempt count to the user. But when I run it and enter a number, it displays an error and the close immediately. I
I am trying to parse below Powershell command for getting list of mac address getmac | findstr "Device" | select-string '(..-){5}' | ForEach-Object{$_ -replace '^(..-..-..-..-..-..).+$','$1'} it gives me output like 7C-05-07-0F-F8-69 I want to a
I having trouble passing command line parameters, that were passed to a bat file, onto a php script This is what I have: @echo off echo %1% set foo=%1% php %~dp0%myscript.php %1% %2% %3% The first three lines work. The 4th line works if it is just: p
I am trying to remove a variable path from the system's PATH environment variable from within a batch script. For example, if MY_DIR=C:\MyDir, I want to remove MY_DIR from PATH. I've tried setlocal EnableDelayedExpansion call setx /M PATH %%PATH:%MY_
I have a batch file which has the content FOR /F "tokens=1-4" %%A in ("REG QUERY HKCU\Environment\") DO ( echo %%A %%B ) pause However when I run this, a cmd window opens like I expect but it closes very fast, before I can read the tex
I am doing mobile automation using appium with selenium. I willing to run the appium server using commands through cmd prompt in windows machine. Could any one help how to run through cmd prompt and what is the command to run it without clicking laun
I have Windows 7 and I tried to use the 'make' command but 'make' is not recognized as an internal or external command. I did Start -> cmd -> run -> make, which outputs: 'make' is not recognized as an internal or external command,operable program
In a .vbs i have something like Dim sh Set sh = WScript.CreateObject("WScript.Shell") 'run conf sh.run "cmd /K php -c php.ini -f some_path\runer\run.php & pause",0,false 'Navigate to the nginx folder to run server sh.run "cmd
When I run this code if there is no Num.txt it says that it cant find the file. how do i stop it from saying this i have tried >nul but it doesn't seem to be making any difference. @echo off for /f "delims=" %%x in (Num.txt) do set "d=%%
Redirecting CMD Commands To An EXE File Long story short, basically I have the problem that every time I run BCDedit on the .BAT that I converted into an .EXE it never worked and I thought that the reason why it wasn't work was because it wasn't on P
I'm trying to efficiently name variables a1 through a9 with !%f%! through !%q%!. I tried creating a for loop to complete this: set w=0 for %%K in (f g h i k l m o q) do ( set /a w+=1 set /a b%w%=%!%%K!% set /a a%w%=!b%w%!%%13 ) The error is that ther
(OS: Windows 7) Using SC.EXE I have created a Windows Service. Additionally, I created the necessary registry entries to specify the Application path (using key Parameters). The "Application" is a .BAT file that sets several environment variable
we have a simple batch file that creates a backup of a folder and appends the date & time to the end. We use this incrementally and it outputs a folder such as "data 28-04-13". I would like to add the time to the end of this, however my code
I want to rename files using the command prompt with a prefix of 'g_x_'. The structure of the original file names are: 000_1565.7k I have tried: ren *.7k g_x_*.7k That code will rename the files to 'g_x_1565.7k', but i really need the files to be nam
I'm trying to find the best way to switch between the two python compilers 2.7 to 3.3 If I run python from cmd, I would you use something like python ex1.py where I set "python" from window environment variable from my computer properties to poi
I am trying to execute a cmd command from .NET and using the find cmd command as a pipe. But the find cmd command takes the value in string but when i am creating my string variable instead of taking double quotes it is replacing it with /"". My
Below is the crud output of my batch script "kxip12","triss-s16-vm","","triss-db02-vm","false","true","false","MySQL","false"," "," ","PTROW
I am new in batch script. Currently my file is showing in below format. i want the details output where date should be 10days before the currentdate (means date-10). Currently its is showing in latest date 00000064 xxyz 2013-06-17 14:37:11 00000065 x
How I can clear text that prints in command line with Java? I want to clear Text1 after prints and overwrite with Text2. I search and find this code but it don't work. public class className { public static void main(String[] args) throws IOException
I just experienced a search dir *T.java in a cmd.exe giving back SortedArrayList.java as well as ReaderT.java (my Test class filename structure). I can't infer a case sensitivity switch from the help output of dir /?. Is there still a way though? Add
I am using Blat that is command line tool for sending the mail from command. First I run the install command to store the mail server which create the entry in registry like that......... First I was set the SMTP server to smtp.mail.yahoo.com but the
I'm making gui to rtmp-plugin that is commandline program. I need way to read output data from cmd program to three variables: downloaded, time and done. In cmd output is exsample "3000 kb / 12 sec (12%)" without "". How I can get 3000
I am writing a batch file that will generate/write to a property file based on multiple user input values. However, it is not recording the values of input. The result looks like prop1= prop2= I wonder if there's something I need to know with set tha
I can't find a command or simple batch of commands to recursively remove the "Hidden"-Attribute from files and directories. All commands like "attrib" and "for" seem to skip hidden files. E.g.: attrib -H /S /D /L mydir doesn'
From inside a batch file, I would like to test whether I'm running with Administrator/elevated privileges. The username doesn't change when "Run as Administrator" is selected, so that doesn't work. If there were a universally available command,
FATAL: password authentication failed for user "postgres" I use windows 7, in order to fix the problem, I modified the file pg_hba.cong from # TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6