0
votes
1answer
47 views

Batch file output issue

I am trying to get a batch file to output some data to a CSV file. The command I have works perfectly in the command line but not when I copy it to a batch file. In the batch file, it just hangs and ...
-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 ...
-1
votes
2answers
94 views

Command only working when put directly in command prompt, not in batch file

On my SBS 2011 I have a batch file called wakeup-nas.bat, with the following contents: wol.exe 5475e0d59ffa wol.exe is an executable for sending wake on lan packets. It is in the same directory as ...
0
votes
0answers
48 views

Display only the last line of a windows command line executable

I'm trying to write a batch script that manages simple software deployments. One of the steps in the script compresses a file structure into a 7zip archive. During the compression process, the z7ip ...
1
vote
1answer
577 views

Pentaho Windows Batch file not running when executed on Windows Server 2008

I'm running a Pentaho Kettle Kitchen batch scripts on Windows Server 2008. When I launch the batch file, the Windows Command prompt pops up and then disappears. I've changed all files in the folders ...
1
vote
1answer
856 views

Win2008Server R2 - no window running .bat file via task scheduler

I'm running a couple of batch files via Task Scheduler that call rsync. The .bat files work great when run manually and appear to be running fine via TS as well. HOWEVER, it does NOT open a cmd ...
0
votes
3answers
3k views

how to get default gateway of certain adapter in windows bat?

Please see below ipconfig output in windows. C:>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection 11: Connection-specific DNS Suffix . : Link-local IPv6 Address . ...
4
votes
1answer
4k views

How to delete scheduled task from command line without confirmation? (schtasks delete)

I can create a task from command line like this: schtasks /create /tn SomeTask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991 and now I need to delete it. However the command needs to ...
1
vote
1answer
752 views

command line REGEDIT command (edit) without a popup

I am attempting to disable UAC via a batch file with a REGEDIT command, and everything works - but, I need to be able to do this without clicking. When I run the: REGEDIT /S somefile.reg It works ...
0
votes
2answers
1k views

Access a Network drive from another user from CMD (windows)

I have written PostgreSQL backups scripts that backup all the databases to file. pgAgent.exe (a scheduling daemon) starts the BAT scripts under the local postgres user. The normal setup is to backup ...
0
votes
1answer
258 views

Two-way rsync between two servers

I read about rsync but I want to ask how can I do the following by rsync: I have two files in to different machine (UNIX-AIX) and have the same name. server1 : ..../file.txt server2 : ..../file.txt ...
1
vote
2answers
158 views

Why does the Windows command line change the command when running from a .bat file?

If I want to run the command md5deep -rb . | find /I ".jpg" | sort > local.md5 and I run it from the command prompt, it shows exactly like how I typed, but when I put it in a .bat file and run ...
1
vote
1answer
188 views

encrypt files by external GPG public key tools?

how i can encrypt files by eternal GPG public key ? for example user A generate public key A.pub and sent to me A.pub and you need from me to encrypt file by a.pub and sent it to you how i can do ...
1
vote
3answers
4k views

Store output of Windows command in batch file

I need to store the output of a command line in a variable. How can I do this?
0
votes
1answer
134 views

how i can read n first bit command output in windows batch file?

i use checksum command in my batch file and the output of command as follow : 69514a29dc44cd83b42658e917ed9baf *file.txt i want to return checksum only so i should store it in variable without ...
0
votes
2answers
884 views

Bactch files: if-then-else and for loop syntax on Windows?

I want to write a batch file and we want to use if-then-else and for loop statements, but I don't know it and its option. Please can anyone help me?
0
votes
1answer
186 views

import configuration file when batch start ? (OS=Windows)

I write batch file and it has a large number of variable so i decided to put all variable on text file (conf.txt) and import it at the beginning of batch file so please i need the command line do this ...
0
votes
5answers
813 views

Send encrypted mail using GPG by command-line?

A few days ago I asked about how I can secure email and many people advised me to use PGP tool, and I read about it and I use it. Now I want to write a batch file to send encrypted email with ...
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
1answer
1k views

Batch file code to find and rename all files ending in a space?

We host Macintosh files on our Windows 2008 servers. They have files like somegraphic.eps ._somegraphics.eps (hidden) Many times our users will add non-standard characters to the files, like ...
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
3
votes
1answer
792 views

how i can pass a file directory (path) as parameter?

how i can pass a file directory (path) as parameter to batch file in windows operating system bash file in unix operating system
1
vote
2answers
747 views

How to send the current working directory as an argument in windows?

I want to send a path as an argument to an executable. what I want to do something like this: pushd some\folder set x=cd popd MyExe.exe %x% the problem is that the x variable is now equal to the ...
0
votes
2answers
2k views

Windows command line built-in compression/extraction tool?

I need to write a batch file to unzip files to their current folder from a given root folder. Folder 0 |----- Folder 1 | |----- File1.zip | |----- File2.zip | ...
0
votes
2answers
8k views

Change Windows network share permissions using command-line tools

Can it be done without downloading subinacl.exe at all?
11
votes
7answers
5k views

I would like to start multiple computers at once, What software do I use?

I have turned on Wake On Lan on all of the BIOSes in the PCs and I have a simple batch file that runs a free command wolcmd.exe Wake on Lan Command Line The syntax is as follows: wolcmd [mac ...
1
vote
2answers
2k views

Does anyone have a Windows “at /every:” example to explain how to setup a batch file to run every day?

Microsoft documentation for the "AT" scheduler command shows that it has an /every: switch to schedule a script to reoccur on specified days. I've done it before, but I can't remember the syntax for ...
2
votes
2answers
6k views

how to change mapped drive label from command line?

How might one control the label for mapped drives as they appear in My Computer, from the command line? The goal is to have the drive letter at the beginning of the phrase instead of the end, so when ...
2
votes
1answer
550 views

Is there a & (BASH) equivalent for DOS Batch files?

I'm thinking not since that violates the principle of batching. So what are my options if I want to launch two apps in windows in one script.
12
votes
5answers
4k views

Command line - batch file calling another batch file

I have a batch file which calls another batch file that exists in PATH directory (basically calling an executable with additional switches.) : bar.bat: foo.bat file1.txt foo.bat file2.txt etc. In ...
4
votes
4answers
2k views

How to pipe program output to the screen AND to a file under Windows

I have a command which I need to inspect in real time (i.e. see its output in the command prompt MyProgram.exe) and to have a log file for later inspection (MyProgram.exe > log.txt) How can I make a ...