Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
2answers
49 views

My “break” command is broken

I am not a programmer and I am hoping you can help me. I am using Windows 7. I have a .BAT file which was running fine up until yesterday, specifically what if failing is the "break" command I use ...
0
votes
1answer
48 views

Batch file for getting all file names within a folder

I'm using a program called Irfanview which can merge two images into one using its command line function. Here's an example: i_view32.exe /panorama=(1,C:\folder1\img1.png,C:\folder2\static_img.png) ...
1
vote
1answer
3k views

Batch file for changing IP address not working in Windows 8

I have used batch files for years on XP and Windows 7 to change the IP settings on my Local Area Connection. For example: netsh interface ip set address name = "Local Area Connection" source = static ...
0
votes
2answers
810 views

Copying files that match one pattern but not another

I have a number of files that follow a pattern like this: <BaseName> . <Version> [ - <Tag> - <#> ] . <Extension> For example: basename.1.0.0.ext ...
4
votes
2answers
753 views

The Directory name is too long in batch

I already asked the question in stack overflow, but did not get any answer from anyone. So i am asking the same question here also. I am trying make a program which will calculate size of all folder ...
1
vote
2answers
37 views

Is there a more compact way to use the IF loop functioning in a batch file?

The classical way is if "%name%"=="john" goto ok if "%name%"=="eric" goto ok if "%name%"=="mary" goto ok But can this be done in more compact way?
1
vote
2answers
128 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} ...
1
vote
1answer
100 views

Need Batch File to close a Window.. NOT the batch window

Complete novice here so please forgive if the answer is obvious. I have a batch file that does the following. Starts program 1 Waits 3 seconds (I have to click a button on program 1 after it opens) ...
0
votes
1answer
48 views

Associating Windows file extension with specific bat file and support argument passing

On my Windows 7 system, I have associated the .blend extension with a specific bat file I wrote, which is shown below: blender.bat: set PYTHONPATH="" "C:\Program Files\Blender ...
0
votes
2answers
102 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
0
votes
2answers
82 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, ...
-3
votes
1answer
62 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
113 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 ...
-3
votes
1answer
201 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 ...
1
vote
1answer
76 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
156 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
1answer
55 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
151 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 ...
0
votes
1answer
201 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
0answers
33 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
813 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 | ...
1
vote
2answers
6k views

Upload folder with cURL and FTP using Batch file on Windows?

I am trying to upload a whole folder, including it's sub-folders and files to a folder on my server from a Windows batch (.bat) file. Below is the command I have for the Upload part... curl -T ...
1
vote
1answer
220 views

Batch - call another batch and have it executed

I am trying to get some batch files working. The first one I have (which works) takes a .rar from one drive to another and give the dir same name as the files put to rar and then copy a rename.bat ...
0
votes
4answers
2k views

.Bat xcopy - special characters

this is the code of my .bat file: @echo off xcopy "C:\Users\Administrator\věc" "C:\věc" /e /i /h echo Done pause However it says:File not found - výc. See ě char changed into ý Why is it so? ...
1
vote
1answer
193 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
0answers
17 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 ...
1
vote
2answers
4k views

Can I put comments in a sftp batch file script?

I'm using sftp batch scripts to automate some file transfers. Is there a syntax for putting comments in the batch files? For example: sftp -b mybatchscript.sftp nick@server Where ...
3
votes
2answers
1k views

Start MySQL from the command line without losing prompt

I'm on Windows 7. I'm trying to run a .bat file where I stop and start MySQL and run some other commands. However, running "C:\Program Files (x86)\EasyPHP\binaries\mysql\bin\mysqld.exe" results in ...
0
votes
2answers
28 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 ...
3
votes
1answer
127 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 ...
2
votes
1answer
260 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 ...
1
vote
1answer
693 views

What would prevent a .BAT file from being run on a mapped drive?

In WinXP SP3, I have a .BAT file on a mapped drive. When I try to run this .BAT file (or even right click->edit) it gives me: --------------------------- Windows cannot access the specified device, ...
0
votes
1answer
111 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
85 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 ...
0
votes
1answer
329 views

Using SETX to configure a pc's LM_LICENSE_FILE environment variable

Various Windows applications such as Matlab, Altair, Nastran etc use license servers, which require a system environment variable - LM_LICENSE_FILE, to be updated which would take a value along the ...
0
votes
1answer
67 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
1answer
76 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 ...
0
votes
0answers
76 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 ...
8
votes
5answers
33k views

How do I echo a TAB char on a command prompt

On a windows batch file, what is the proper way to echo a TAB? echo A<TAB>B<TAB>C I know I can type the TAB char between entries, but most editors will display it as a sequence of ...
0
votes
1answer
77 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 ...
0
votes
0answers
115 views

How to execute batch script in windows right?

According this answer in How do I delete a folder which is nested quite deep and avoid “File name too long”?, I created 1.bat file with following source: @echo off if not (%1)==() cd %1 for /D %%i in ...
0
votes
1answer
523 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 ...
0
votes
3answers
503 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
35 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
111 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 ...
1
vote
3answers
4k views

win 7 home premium - run batch script on logoff / shutdown

is there a way to run a batch script on logoff or shutdown in windows 7 home premium? [edit] to add a bit of context, im looking to delete everything from my downloads folder when i logoff, so unless ...
1
vote
1answer
247 views

Batch file to combine pdf files in alphabetical order

I want to create a batch file to combine selected pdf files in alphabetical order. Currently I have the following script: @echo off setlocal enabledelayedexpansion FOR %%A IN (%*) DO (set ...
0
votes
2answers
71 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
220 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
0answers
116 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 ...