0
votes
2answers
94 views

How to run multiple commands with psexec?

I need to run a command to uninstall forefront on some of our workstations and am having a bit of trouble formatting the command. Here's what needs to happen (in multiple commands) xcopy ...
-1
votes
2answers
88 views

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility ...
2
votes
1answer
50 views

Command Line Script Issue

I've been working on a batchfile script for a few weeks now that should automate certain routine tasks I need to perform during my work. However, I've stumbled upon a problem which I haven't been able ...
2
votes
2answers
177 views

How Can I Create Multiple Files of a single file in multiple Directories?

Hello I am trying to create multiple copies of a single file in multiple directories? for example I have 6 folders with a single file in each folder named lp.html, How can I run a batch to create 100 ...
5
votes
2answers
3k views

Windows: How do I add a program to the system's path environmental variable from the command line?

I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a ...
3
votes
1answer
398 views

Save output and exit code of command to files on windows

I want to run a command and save its output and its exit code, in different files. Here's what i am doing: cmd.exe /C command 1> %TEMP%\output.log 2> %TEMP%\error.log && echo ...
0
votes
2answers
51 views

Files and their headers? [closed]

(I'm a dos guy , I always liked to view files in norton commander and see inside stuff etc) however over the years I've noticed that each file(well , most of) ( binary files ) has header : For ...
2
votes
5answers
6k views

command line - switch to administrator mode

Is it possible to switch from normal mode to administrator mode in command line? I don't want to open command line by right clicking and selecting "run as administrator". Thanks
0
votes
0answers
200 views

Windows Group Policy CMD scripting problems, XP

I am creating a local group policy to lockdown an XP work station. I have used "Run only allowed Windows applications" to create a whitelist of aproved apps. CMD.exe is on that list but I want to use ...
0
votes
1answer
118 views

PowerShell - type no inside every directory and open up notepad2

Do you know the notepad command in PowerShell or cmd.exe? I would like to do the same for NotePad2 I would like to type the following command inside PowerShell and open up the me.txt file; PS ...
19
votes
4answers
60k views

Get directory containing the currently executed batch script

I use %0 in batch file to get the containing directory of the batch file but the result is :- c:\folder1\folder2\batch.bat I want just directory, without batch file name, like this :- ...
0
votes
1answer
173 views

How to create a windows user from the command line, using a password from a file

Im in a somewhat unique situation. I am trying to create a windows user, using the command line or a batch file. I know how to do that in the basic case: net user username password /add The ...
1
vote
1answer
444 views

more than one start statment in the same batch file?

I wrote the following batch file: start D:\folder1\bin\run.bat start D:\folder2\bin\run.bat start D:\folder3\bin\run.bat start D:\folder4\bin\run.bat It executes the first start but then gives me ...
0
votes
2answers
999 views

Escape TAB in cmd.exe?

I need to pass a tab character into a program from the command-line on Windows. eg: grep "foo<TAB>bar" filename However, cmd.exe's auto-completion gets in the way. On Unix, you can hit Ctrl-V ...
1
vote
3answers
3k views

how i can get folder and file name in windows and store it in variable?

i have a folder folder1 contain 3 files file1 , file2 and file3 ... i need command line to do the following task ... store the name of file in variable ... because i want to write dynamic batch
2
votes
1answer
600 views

print exit code in cmd in windows os

print exit code in cmd in windows os ....some command return exit code ...where this code store...and i want to print this exit code and assign it to variable
2
votes
2answers
451 views

Recursive CMD or BAT Windows Script

How can I create a BAT or CMD which will iterate through a folder tree and run same command agaists each folder file? E.g myexe.exe C:\Documents and Settings\folder1\filename.txt myexe.exe ...
3
votes
2answers
1k views

Difference between UnxUtils and GNU CoreUtils

I am a Windows user who wants programs like grep and sed along with other utilities like ls, cut etc in my command prompt. I came across 2 packages which would accomplish this UnxUtils GNU ...
6
votes
3answers
825 views

How to escape the > sign on Windows command line?

For example, foo -option 10->30 file.ext (this is an actual syntax required) redirects the output to a file named 30. How do I make cmd understand that I would like to pass the actual > character? ...
2
votes
2answers
1k views

Batch file to call multiple batch files and keep going after errors

I have a batch file like this, the issue that I have is that if the first batch file fails, the second one never gets started, how can I get them to both keep going? @echo off MapNetworkDrive_J.cmd ...
0
votes
4answers
3k views

Non-blinking block-cursor in Windows XP command-prompt?

Purpose I normally work in many UNIX-like environments using Xterm. I have grown fond of the non-blinking block-cursor it uses. In fact, I have grown so accustomed to it (especially in Vi) that it ...
0
votes
5answers
2k views

On windows cmd, how can I get a list of running tasks with full pathname?

I know that the TaskList command show the currently running tasks but it does not show the full pathname. Is there a way to do it?
1
vote
3answers
858 views

Better editing and copy paste abilities for cmd.exe/windows console

Is there any interface that'll make cmd.exe (or for that matter any "console" application) more friendly ? I'm thinking easier copy/paste abilities and more powerful command editing , more like a ...
7
votes
7answers
5k views

How to remove 'Administrator:' from the command promt title

In Windows Vista, is there a way to remove the word 'Administrator:' from the title of a command prompt window? The 'title' command just updates the part after 'Administrator:', so that will not do.
6
votes
2answers
3k views

How to launch a new cmd window from an existing cmd window?

Simply typing "cmd" keeps it in the same window. I'd also like to do "cmd /c command" and have it run in a separate window.
78
votes
8answers
120k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...