Suppose the structure:
/foo/bar/
--file1
--file2
--file3
--folder1
--file4
--folder2
--file5
I want to run the unix zip utility, compressing the bar folder and all of it's files and subfolders, from foo folder, but not have the bar folder inside the zip, using only command li...
I am given to maintain some batch files and i repeatedly see this line in the beginning of every batch file..
FOR /f "usebackq tokens=*" %%a IN ('%0') DO SET this_cmds_dir=%%~dpa
CD /d "%this_cmds_dir%"
Does anyone know what the first line does? What is %%~dpa? What is %0 ? What is usebackq?
...
So given:
CREATE TABLE stuff (
really_long_title int(10) NO NULL auto_increment,
really_long_title_number_1 varchar(10) NO NULL auto_increment,
PRIMARY KEY (blah)
);
DESCRIBE table;
I would like to be shown my table with two rows (blah and blah1) and attributes for each. Instead I'm shown the two rows of my table but in t...
is it possible to replicate this using cmd in c#
...
I have a problem with my script. What i want it to do is take the first .m4a file of multiple .m4p files and do faad(it converts the .m4p file to a wave file but keeps the .m4p file),then BEFORE it goes on to the next .mp4 file i want it to do oddenc on the .wave that was newly created via the faad command, this creates an .ogg file.I...
I never studied OSes, so forgive me if this sounds basic or silly, but I'm curious about if one could replace the cmd prompt in Windows. I am NOT asking for programs that actually do this, as I've looked around and not really seen any.
What I'm asking is 1) if it's actually possible to write an entirely new program that would behave li...
Hello all, I would like to know how I could execute a command whitout appears the cmd window.
My code is in Python and the O.S. is Windows7.
The problematic line is:
os.system(pathandarguments)
The program works fine, execute the given path with the arguments but I loose the control of my program because my program window minimizes, I ...
I'm trying to open a file in it's default editor after the user has created the file. So far my script is:
@echo off
@echo --- Create A New File ---
@echo -
@echo Where should we put the new file?
set /p fileLocation=@ %UserProfile%\
@echo -
@echo What do you want to call your new file?
set /p fileName=@
@echo -
@echo Almost Done! What...
I have a program launching a website via the following command.
cmd "start /max http://url.com"
When launching a website via this method it uses the default browser with its default settings for opening a new window. for example, firefox and IE will open the window inside the tab of an existing window if they are set to do so. I hav...
In vbscript, how do I run a batch file or command, in the current cmd prompt window,
without starting a new process.
For example. According to script56.chm (the vbscript help apparently)
Windows Script Host
Run Method (Windows Script Host)
"Runs a program in a new process"
So if I have code that uses that e.g. a VBS file, and a BAT...
Hello,
I have a big apache log file and I need to filter that and leave only (in a new file) the log from a certain IP: 192.168.1.102
I try using this command:
sed -e "/^192.168.1.102/d" < input.txt > output.txt
But "/d" removes those entries, and I needt to leave them.
Thanks.
...
How to print the output of a batch script to the email client.
...
Is there a way I can open a new cmd window and pass a variable and once completed close that window?
I have found some info but not enough that I can get it to work.
system('start "List Perl files" dir c:/dfd/dfdf.pl /B');
Opens window but does not run script.
...
Hi all
I have a pretty simple question (and these are typically the ones I spend most of my time tearing my hair out about). I am using a batch file to execute all the .sql queries that are in the same directory as the batch, and to save all their results to various .csv file.
Here is my code:
@echo off
REM Check that all parameters ...
Is there a way to close a cmd window when a task is complete and also tell how many are already open?
system( qq{ start "List Perl files" perl c:/perlscripts/new_spider.pl $new_href } )
...
I have an english Windows 2003 server with asiatic language support activated. The two only fonts available for the command window (cmd settings) are raster and lucida console. Neither the one nor the other display the Kanji correctly (displayed as question mark).
Is there a solution to get them displayed?
Is there some transformation ...
What exactly happens when a .NET console application starts?
In the process explorer, when starting the exe I am wondering why I cannot see a "cmd.exe" process as a parent process for the console application. What exactly is displayed then?
Is there a way to replace the "default" console window by another one? I guess this would mean m...
Hi to all
I'm need to create a Python shell script that refresh output every n seconds like top unix command.
what 's the best way to do this?
...
Is it possible to set a environment variable at the system level from a command prompt in Windows 7 (or even XP for that matter). I am running from an elevated command prompt.
set name=value seems to be only valid for the session of the command prompt..
...
Hello!
In Windows Batch files, you can use this syntax to perform search&replace on variables:
set myvar=%myvar:foo=bar%
How to do this, however, when “foo” or “bar” include an equal sign? Escaping it with ^ does not seem to work…
Thank you.
...