Text file containing a sequence of commands or program invocations that does not need user intervention.

learn more… | top users | synonyms (1)

0
votes
0answers
9 views

How can I remove all but last 10 characters in a group of files

How can I rename a group of files like admin_ball_126608454.gma another_thing_384157357.gma to ds_126608454.gma ds_384157357.gma
-4
votes
0answers
43 views

How to create Windows batch file to perform these tasks? [on hold]

I need to create a batch file that should do the following: Run another batch file in administrator mode (Run as administrator) Once above file is run, delete files/folders from certain directory ...
-3
votes
1answer
29 views

How can I get a win 7 batch file to output a list of unique filename prefixes?

I have the following files in a folder MyDocuments 2014-10-10.zip MyDocuments 2014-10-09.zip MyPictures 2014-10-10.zip MyPictures 2014-10-09.zip Ideally I would like the output to show MyDocuments ...
0
votes
2answers
30 views

how to run a batch recursively

I have a parent folder (BIG_Folder), which contains many subfoldes (folder1, folder2, folder3 ...) in each subfolder a batch file exists, it is always the same (x.bat). I want to run all bats, ...
1
vote
1answer
25 views

How fix when cmd prints command instead of run it?

I am trying to automate chef setup for windows. So I wrote .bat according to this: call winrm quickconfig -q call winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"} call winrm set winrm/config ...
0
votes
1answer
25 views

Batch file to search for a file, then delete that and the parent folder

Basically I need to search the folders within C:\Windows\ccmcache and search for adobe cc.msi and then delete the entire contents of that directory This is what I already have @echo off set ...
0
votes
0answers
9 views

Upload a file to ftp/another Web server with batch

I need to upload a file using batch commands. I can either upload it to an ftp server or another form of Web server (hfs)
0
votes
1answer
38 views

Find IP with Batch

I need to use a command of some sort to find the external ip of the user of my batch file. I have tried many methods but I need the batch file to recognise the ip as a variable of some sort so it can ...
0
votes
2answers
50 views

Using cmd to edit reg keys?

I need to edit 2 registry keys in Windows 8.1 but make it in a way to be able to use them in a batch file to be able to use them on more than 1 PC. In the batch file I will have more reg key's that ...
-3
votes
1answer
28 views

How to search a string and extract another string pattern from a text file using windows batch script

Consider out.txt file have the following format Display Variable; ID NAME value ===*==========*================ 201 Variavle 07Dec2014 Display Variable12; ID NAME value ...
0
votes
0answers
18 views

Batch conditions and variable

I have a question about variable and batch windows. The main goal is : I have files in directory (pattern 0? with ? a number between 0 and 9). First I create a %%nf.bat (filename of each files) ...
0
votes
1answer
22 views

How to rename a file to include remote machine's hostname via batch script?

I have a .bat file that copies a file from one computer to another. During the transfer I would like to rename the file to include the hostname of the computer from which the file originated. The ...
0
votes
1answer
21 views

Batch File Gives Message: “1 was unexpected at this time”

I wrote a batch file that checks if a server is online. It uses a few cygwin-64 tools. Here's the batch file: wget -S http://www.example.com/ -o headers.txt -O index.html cat http-commands.txt | ...
0
votes
2answers
43 views

How to set a variable in DOS batch file?

How to display only the status of ping results and not the whole output of ping? ** My server1 is .... online ** My server2 is .... online ** My server3 is .... offline I tried to this with the ...
0
votes
0answers
13 views

Add timestamp to file names

On a server running Windows Server 2008 R2, I would like to rename a number of files matching this quasi regexp: "\d+.\d+.\d+_FOO-\d+.xml". Each new file should contain current time "hhmmss" as shown ...
0
votes
2answers
19 views

Output redirection at the beginning of line

I'm used to specify output redirection on the end of the line like: echo blah > output.txt Both in Windows and *nix. Recently I'm seeing more and more examples that redirect at the beginning of ...
1
vote
1answer
49 views

WMIC - how to check if return empty value?

I'm making a batch file to make log of computer (I need save some informations before format PC's on my work...) So I found some commands to create this log, see: rem -- Windows Version wmic OS get ...
0
votes
1answer
27 views

Prevent ConEMU from closing tab after last program exits

What I want is some way to click on ANY batch file from Explorer and see the output without writing a helper script to PAUSE it afterwards. This is a question which seems likely to generate more OT ...
0
votes
1answer
32 views

“START /W” with additional switches

I am trying to run a silent install of several exe's via a batch file, however need them to run one by one instead of simultaneously. It seems like "START /W" wont work when switches not native to it ...
1
vote
1answer
36 views

VLC Command Line Flag --loop from Batch File Not Working

I used to have a batch file that started a playlist in VLC, set to loop indefinitely. Now though, I'm not sure if I have messed it up at some point or a new version of VLC has rendered it obsolete, ...
0
votes
1answer
28 views

Batch Move using wildcard in filename is getting files that do not match parameters:

I have a number of files with a 3 digit prefix. I'm attempting to move files based on the prefix using a wildcard. I expect that move 100*.sql subdir would only move files with the .sql extension ...
1
vote
1answer
37 views

Using msiexec to uninstall programs

I have found a batch file that removes a lot of bloatware etc. Example: start /wait MsiExec.exe /I{DB731A07-34DE-4BE0-AE94-45C83E28A56C} /quiet I guess the {DB731A07-34DE-4BE0-AE94-45C83E28A56C} ...
0
votes
0answers
30 views

Batch file can't find specified path when run from excel hyperlink

I have an excel file that has a list of IP addresses and I have linked a batch file that runs a simple ping test and outputs the results to a text log. When I run the file from the network location ...
3
votes
1answer
63 views

How to make ConEmu attach on start

I have an existing .bat file which uses the start command to launch multiple tasks, e.g.: start cmd.exe /k "echo task 1" start cmd.exe /k "echo task 2" start cmd.exe /k "echo task 3" What happens ...
0
votes
0answers
22 views

Trigger UAC for a command in a batch

If I run in a batch the command: REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead from a batch I get the error: ERROR: Access is denied. If I select Run as Administrator, it works. ...
1
vote
2answers
54 views

Ampersand in Windows Password

I have a password for a Perforce account which contains an ampersand (&) and when I try to use certain P4 commands, I get the following error: Perforce password (P4PASSWD) invalid or unset. I ...
0
votes
1answer
39 views

Finding Files by wildcard name and copy them

I've got a program that compiles itself and generated .exe files in its subdirectories (such as release_win_* directories for every application "App1", "App2", etc.). I'd like to find specific these ...
0
votes
3answers
77 views

Rename files sequentially from input using batch file?

The company I work for processes bills, and I regularly have to check these bills for accuracy by comparing what was entered into the database vs. the actual bill image. Any time I find an error in ...
0
votes
0answers
30 views

Change default keyboard layout with bash script

I would like to know if there's way to create a bat script which does the following things: Add US-Dvorak as a keyboard on the computer if it's not already there. (Maybe this helps, but we also need ...
0
votes
0answers
28 views

Batch File:List all files of a type, rename files, flatten the directory

I am looking for help with a batch file(s) that will allow me to move all files of a particular type (*.PDF's for example) to a new folder. HOWEVER I would like to have features not readily apparent ...
2
votes
1answer
30 views

Batch create subfolders in path with spaces

I'm trying to create a subfolder 2015 in many project folders on a shared drive. A previous post here already explained perfectly how to do this using CMD: here. This solution said: FOR /d %A IN ...
0
votes
1answer
57 views

How to properly use this code?

I'm trying to get this code to work. I want this batch file to disable the shutdown button for the current user. How would this work? Like what would I substitute in the SID:D section? Here is the ...
-1
votes
3answers
153 views

How to run a .bat file silently and automatically

How am I going to run a .bat file in silent/background? And what command should I add to run a .bat file automatically, wherein every time I'm going to turn on my PC everyday the .bat file will ...
0
votes
0answers
17 views

How to switch user rights within Batch file (de-elevation after elevation and back)?

I have a batch file that I need to run as Administrator, but within this batch file I need to run some commands as non-administrator, followed again by admin-commands. admin commands user commands ...
0
votes
1answer
42 views

net use maps to wrong user on Windows

I have a Batch script that I need to run with elevated rights (starting Services etc.). This script also does net use g: \\network\path. But because I run the batch file as Administrator the mapped ...
-1
votes
1answer
48 views

How to accept user input command in batch file?

I would like to write a batch file in which the user input would be run as a command, essentially functioning like command prompt. Example: batch file is run: user input: echo hello program output: ...
0
votes
0answers
44 views

RAR/ZIP Extract and Delete in Right Click Menu

In WinRAR, is there a way to use something like 'Extract And Delete Zip File' in context menu? I just need this option, it can be whether a batch file or another program that has this in context menu ...
0
votes
1answer
67 views

Find highest possible screen resolution from command line

With Powershell, I can request the current screen resolution. this is not what I'm trying to do. I'm trying to find the maximum resolution I can set the screen to (slider all up). Is this even ...
1
vote
2answers
59 views

bat file to open up a chrome browser window with no toolbars

How to use a bat file to open up a chrome browser window with no toolbars.(just like a popup window) @echo off start "Chrome" chrome --new-window http://localhost/jayambe/ this code when run opens ...
0
votes
0answers
19 views

Batch File to Send Zip File to CD/DVD drive [duplicate]

I have written a batch file which creates a Zip from a set of files. This works fine. I would now like to extend this batch file so the outputted zip file (from the above batch file) is written to a ...
-1
votes
1answer
35 views

Batch file timer [closed]

I would like to know I there is any way to make a timer in a batch file where you press something and it does something and if you don't it does something else Thanks
0
votes
0answers
23 views

Losing credentials when adding echo off

I needed to map a drive to another domain and it worked perfectly, here is the batch file. net use W: \\com-p55.test.ad.testdom.com\software$ /USER:domain\username password /PERSISTENT:YES The ...
0
votes
1answer
56 views

How to delete loopback adaptor in Windows 7 using batch script?

I have created 10 loopback adaptors on Windows 7 using devcon devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP I put this in for loop and every thing is ok but now I want to delete them using ...
2
votes
1answer
61 views

Reg.exe Offline registry edit

Ok I want to edit an offline registry entry from WinPE, if I am booted into the OS (32bit) the reg key is: hklm\system\currentcontrolset\services\mountmgr\noautomount So I boot into WinPE and run ...
1
vote
1answer
36 views

How to have a batch call another batch based on its location?

I have made a file I will put up for download. It involves one batch file calling another. Most of the time this is not a problem, but in my case I have no clue where they will download it. So how ...
0
votes
1answer
41 views

How to unhide a batch file

I am trying to make a .bat script that will unhide another .bat file in the same folder only once. I am making an auto backup for a game, but first I want the user to agree to Terms of Use and ...
5
votes
1answer
62 views

Why do my .BAT files on Windows 7 not PAUSE properly?

I've been playing around with writing batch files on my computer for some time, and I am confused about why PAUSE doesn't work like I thought(maybe I'm just doing it wrong idk, just really confused). ...
-1
votes
2answers
181 views

creating a batch file to run different codes sequentially

Im trying to create a .bat file with with different codes, each of these codes exceute different commands, but I don't want to run them separately but in one batch file. All my batch codes that ...
0
votes
1answer
51 views

Batch is starting too fast after reboot

So i have batch1 as this REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V 2 /D "%~d0\bat\batch2.bat /f and then I reboot the computer (Windows 8) and batch2 starts. It seems like ...
1
vote
0answers
30 views

How to save Ping record in every single hour for 2 weeks?

how do I save the record ping "in every single hour" for a certain period, for example for 2 weeks, with the format dd / mm / ss, dd / MM / YYYY and beside it is the result of the ping. So we can ...