Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

-3
votes
1answer
87 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
29 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
101 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
416 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
93 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
16 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
25 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 ...
2
votes
1answer
166 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
78 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
61 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
146 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
57 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
2answers
92 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
62 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
106 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
30 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
95 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
48 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
315 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
89 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
1answer
87 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
80 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
66 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
775 views

How to run a .bat file silently and automatically

How am I going to run a .bat file in background? And is there any possible way wherein every time I'm going to turn on my computer everyday the .bat file will automatically run and execute.I don't ...
0
votes
0answers
48 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
72 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
176 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
105 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
236 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
590 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
43 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
24 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
347 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
137 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
42 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
91 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
82 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
970 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
61 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
46 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 ...
0
votes
2answers
63 views

How to you tie different batch commands into one file to run sequentially

I have a 5 batch files but I want to put them all in one file to run one after the other consecutively. Is that possible? What is the command that can tie the different files together .. I don't want ...
2
votes
1answer
1k views

Batch delete temporary Windows files (system, browsers, cache, etc) for all users

Is anyone in this community using a particular technique to achieve batch deletion of temporary data (such as Windows temp folders, browsers cache, etc) for all users? The tricky part seems to be: ...
0
votes
2answers
71 views

send output of batch file to current directory

I have a .bat script that concats some text files into one big file. I would like to have the resulting file go to the current directory instead of the hardcoded path. Here is my script: @echo off ...
1
vote
2answers
413 views

How can I zero-pad numbers in a Batch FOR loop?

I am writing a batch file to do some operations on remote computers in my building. They are all named with the same prefix, but the number at the end changes (01–65). I tried to follow an online ...
1
vote
0answers
81 views

Unable to send files over 1 MB via FTP on Windows

I tried to send multiple files via FTP commands using simple batch script. It works fine when the file size is less than 1 MB but when the file is larger than 1 MB I get the following error log. ...
0
votes
0answers
27 views

Automate the closure/reopening of browser windows

Aim:- To have an internet browser logged in to a live stream and automatically close at a set time, then reopen a new browser window to a different URL also logged in to a live stream. These windows ...
0
votes
0answers
54 views

Batch ren Command - Only Rename Files with This Pattern

There's a program I use that renames some files to a random string on each use. It's annoying, and I can't get it fixed, so I wrote a script to change them back when I'm done using the program. The ...
0
votes
2answers
151 views

Batch file, script or shortcut to delete the most recent file in a specified folder

anyone know how to make a batch file or script or some other simple thing like a shortcut that calls some exe to do the following: I want to click on something (batch file, script or shortcut) that ...
0
votes
0answers
50 views

Windows 7 adding context menu entry

I followed this tutorial which explains how to lock an unlocked bitLocker drive without restarting explorer. This works perfectly. However, when I click "Lock Drive" in the context menu I get: ...