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

learn more… | top users | synonyms (1)

0
votes
1answer
591 views

Run a .bat file upon logoff, windows XP, no domain controller

I have a standalone windows XP machine which is using pGina 1.8.8 to authenticate. Users log in using a single-sign-on ID (from LDAP) and are then logged into windows XP pro. I have a batch file which ...
1
vote
1answer
5k views

Better-quality FFMPEG conversion from MTS to AVI

I got the following code from some forum. I'm a beiginner, so please bear with my questions ... I need to convert a video from MTS to AVI in very good quality. Currently I'm using the following code ...
1
vote
1answer
14k views

Add registry key via batchfile

I'm trying to create a registry key with a batch file. I really need to be able to do this via a batch rather than a VBscript or .reg file. So far by using this guide, I've come up with this. but ...
2
votes
1answer
62 views

command line with spaces

I want to do a command line like: for /F "tokens=4" %%F in ('c:\spaces spaces\filever.exe /A /D D:\Spaces Other\a.dll') do (set VERSION=%%F) I encounter a spaces problem. How can I write that ...
0
votes
1answer
125 views

copying files with certain extension and overwriting

I do this often and I've seen similar questions but not quite the same. I want to copy from z:\foo to c:\bar all .cfm files and overwrite any conflicts. I also want to keep the directory structure ...
0
votes
2answers
1k views

Windows Batch FINDSTR searching for “” and < >

These two work seperately but I can't get then to work on the same line, and then to redirect to a text file.. FINDSTR "\""" testingbatch.txt > results.txt FINDSTR "< >" testingbatch.txt ...
2
votes
2answers
566 views

What is the command to check if a command's results mention OK?

Alright, so I was playing around with changing MTU size and wanted to make a batch file to automatically lower it and then raise it later. This is probably simple, but I just can't figure it out. ...
1
vote
1answer
1k views

Run windows batch file from ssh login - env vars missing

I am trying to run a windows batch file from a ssh login. I have successfully installed cygwin w/ OpenSSH on the server (windows 2003). I can log in and run the file, but the file does not run ...
10
votes
3answers
3k views

How can I tell which “explorer.exe” process is the main one?

I have a batch file that changes a few registry files, and then restarts explorer.exe so that they take effect. I'm using the commands taskkill /f /im explorer.exe explorer.exe This of course ...
0
votes
1answer
530 views

Script with .vbs (Internet Options\Browsing History\Settings)

I need to create a logon script that changes this option. It can either be a batch file or a .vbs "Internet Options\Browsing History\Settings\Check for Newer Versions of stored pages" Anybody have ...
0
votes
3answers
3k views

run 'net user' command as administrator

I was writing a simple batch file with the following command net user Abhi * where Abhi is my username and I am the administrator of my computer. On execution, it prompts for a password and then ...
1
vote
1answer
2k views

Batch file in right click menu

I'm making a batch file that is going to encrypt information. I made it so when I right click on the object and click on the "test" button it runs the batch file. In regedit I added ...
0
votes
1answer
3k views

Batch file - wait or quit if a process running

I have 2 small batch files that change the target location of a junction point (mkref /d), in order to switch between 2 iTunes libraries. It works well, but I would like it to stop if iTunes is ...
1
vote
1answer
2k views

How to run a .bat file as administrator automatically each time when I start a specific program?

In order to speed up my computer start time I disable the VM services in startup; and those services are mandatory for me to start the VMware Workstation when I need to use it. So I wrote a simple ...
16
votes
4answers
244k views

How can I check a system's current NTP configuration?

I need to verify the current NTP configuration on some Windows systems. Ideally, I'd like to be able to do this via command line instead of navigating through configuration screens. (I'm working on ...
0
votes
1answer
149 views

How to tell EXIST to look also in the path directories in windows batch file

I'm trying to do this simple thing on windows but it always fail and i think that the cause is that it's not looking in the PATH variable, how should i do? IF EXIST lessc.cmd ( lessc ...
0
votes
3answers
947 views

Which tools bundled with windows can be used to upload a text file to the web?

I have a text file, and I want to post its contents to a webserver. I would like to do it using applications that come bundled with Windows. I don't mind writing a batch script to do it. But I don't ...
16
votes
5answers
120k views

In Windows 7, how to change proxy settings from command line?

How do I change proxy settings from command line in Windows 7? I'm not talking about just the http_proxy. I need to set system-wide proxy settings (the ones in Internet properties setting). How ...
0
votes
1answer
555 views

Extracting file using 7-Zip is taking too much time

I am trying to extract a ZIP folder using 7-Zip from the command line: 7z x "%BackupFileDestination%" -o"%ExtractDestinationDir%" It is taking too much time to do so. It is even hanging on a few ...
4
votes
2answers
19k views

batch script that grants admin rights and goes through all files and folders

I have this, pretty sure its a little harsh but does the job, gives me all the rights to the files and folders on a drive when run on a drive, now I need help getting it to go into sub directories, so ...
1
vote
2answers
286 views

Having problems writing a list of simple commands in a batch file

I am trying to run a few simple batch commands in one batch. For that matter each command is a batch command as follows: rails generate scaffold illness name:string rails generate scaffold ...
1
vote
3answers
1k views

How can I create a popup in Windows with the results of a command called in a .bat file?

I'm calling an exe in a .bat file that returns quickly and I'd like to popup a message box with the results of the text so I can read it (after the program has ended). My .bat looks like this: ...
0
votes
2answers
2k views

Cut a part from a filename (windows batch)

I got files named like this: cam1(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam2(word1 word2 wordN) (24-04-2012 00-11-13).mpg cam3(word1 word2 wordN) (24-04-2012 00-11-13).mpg Need to cut (word1 ...
0
votes
2answers
711 views

WinXP SP3: run batch file when system returns from hibernation

I want to run a *.bat file every time system returns/"wakes up" from hibernation (NOT a sleep mode). How can I do that? System: Win XP SP3. I would very strongly prefer to solve it without using 3rd ...
1
vote
1answer
2k views

Using plink to establish a tunnel for the duration of a batch script

I have a batch script that synchronizes data between a local machine and a machine that can be reached over an SSH tunnel. Rather than leaving the tunnel open all the time, I'd like it to start when ...
0
votes
1answer
1k views

batch file execution failing with PostBuildScript plugin of jenkins

I am trying to execute a batch file to copy my files to another server under the "Execute batch or shell script" option of the "PostBuildScript" plugin of Jenkins. These are the commands in my .bat ...
2
votes
2answers
713 views

How to compile .bat file using QT Creator

Question: How do I compile a .bat file using QT Creator? More info: specifically, I am trying to install Windows Image Writer and the download only includes source files. The README.txt tells me to ...
2
votes
2answers
9k views

'C:\Program' is not recognized as an internal or external command

In Win 2003 I execute command "C:\Program Files\Windows Resource Kits\Tools\robocopy" "q:\SQLBackup" "\\SQLBackups\MyDB" /Z /S /MIR I am getting an error: 'C:\Program' is not recognized as an ...
3
votes
1answer
613 views

How do i run app in bat nonblocking?

Lets say i want to do gcc a.cpp BUT i dont want to block. I just want to run and continue, like running in the background. How do i do that in a bat file? I'm using windows 7
2
votes
2answers
13k views

Redirect pipe to a variable in Windows batch file

I want to stop and start a Windows service from a remote PC using the Windows command line, in a batch file. sc \\192.168.1.1 stop <ServiceName> rem sc \\192.168.1.1 query <ServiceName> ...
0
votes
2answers
1k views

Unable to copy files from protected folders

When I try to run the following copy %HOMEPATH%\"My Documents"\test.txt %CD% from c:\backupSettings I get the error: Access is denied. 0 file(s) copied.
1
vote
1answer
863 views

How to print multiple html files?

How can I print multiple html files located on web, and not on a local drive? Something like: http://www.domain.com/file.html?ID=1 http://www.domain.com/file.html?ID=2 ...
7
votes
3answers
2k views

Configure a Windows shortcut to prompt for input

I swear I remember some way in Windows-past to set up a desktop shortcut that would prompt for input and pass that into the command it's running. Specifically, I want to run a batch file that takes a ...
0
votes
1answer
671 views

Prevent UAC from backup batch file

I have created a batch file to backup my files. I also want to backup the registry. However when i run the regedit /e "U:\Backup\Registry\regbackup.reg" command it pops op the UAC Can i disable ...
2
votes
3answers
5k views

Change directory in batch file with PowerShell

I need to changed directory using batch file in PowerShell. Let's say the batch file named go.bat has the two lines of code. And I'm in q: directory. c: cd c:\abc\def When I run go.bat, I'm ...
10
votes
3answers
4k views

How to extract a complete list of extension types within a directory?

Within a directory, and recursively within it's sub-directories, meaning every directory within a directory is processed, how do I compile a complete list of unique extensions within the directory? ...
4
votes
2answers
1k views

Batch file for creating files according to the days in a month

Update This is not working in my office pc. When i specificy the current month day as only 2. This is an data which it throws:- How many Days this month: 2 The Month is (Blank) The Day is (Blank) ...
9
votes
5answers
7k views

Moving hidden files/folders with the command-line or batch-file

Question Does anyone know of a way to move files and folders that have the hidden, system, or read-only attribute set from the command-line or a batch file? (No, stripping the attributes first is not ...
0
votes
1answer
763 views

Launch a .bat script on a Window machine from a Unix machine

I have two machines, a Windows one and a Unix box. I'm looking for a way to execute a .bat file on the Windows machine from the Unix one. Is this possible? The machines are on the same network and I ...
0
votes
2answers
13k views

How can I refresh my PATH variable from the registry, without a reboot, logoff, or restarting explorer?

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this ...
2
votes
3answers
696 views

Is there some way to universally address the default Program Files folder in Windows 7/2008 via .BAT file?

I'd like to write a batch file, where some commands target items in the Program Files folder, that is naturally cross-compatible from Windows XP up to Windows 7 x64 and Server 2008 R2. However, the ...
10
votes
1answer
12k views

How can I permanently append an entry into the system's PATH variable, via command line?

What I need to do: Append a folder to the %PATH% environment variable at the SYSTEM level. Make the change permanent. How I need to do it: Using the command prompt, or another method by which ...
0
votes
2answers
2k views

Batch file: Change names on files with certain extensions in multiple directories based on the directory name and copy into one directory

I am all new to batch files and DOS, but I hope you can help me anyway. I need to copy files of a specific file type that are now in separate subdirectories, one such file per directory(but more ...
1
vote
2answers
849 views

Creating separate archives for a set of files

I have directory containing big list of files. I'd like to gzip each file of a certain mask to a separate archive. How do i do that automatically? For example here's sample directory contents: - ...
0
votes
1answer
133 views

Batch Image Labelling

I have an image I would like to make 50-100 copies of, but for each copy a label is added in the form of a number corresponding to the copy number. Is there existing software that does this? Is there ...
3
votes
2answers
3k views

Programmatically adding entries to Windows 7 Start Menu?

How does one add entries to the Windows 7 start menu for All Users programatically? For example I might want to add the folder MyApps containing a shortcut to myapp.exe and a URL for www.myapp.com. ...
1
vote
0answers
1k views

Is it normal for scheduled task behaviour to differ from running the batch file manually?

I have a windows service that I need to stop and start every 30 minutes using a Windows Scheduled Task. The service itself can be manually stopped via the Services management console (right-click -> ...
0
votes
1answer
1k views

Repair BAT file association (to make it start again)

I am just hitting myself over the head right now. I wanted to change my "EDIT" setting of .BAT files to PsPad - instead I accidently changed the OPEN menu. Now I was able to remove the entry using ...
2
votes
2answers
852 views

Variable Names Between Called Batch Files

Let's say I have two batch files, foo.bat and bar.bat, that are located like so: root\foo.bat root\grub\bar.bat Let's also say that both files contain a line that sets a variable, like so: set ...
3
votes
1answer
135 views

Batch-file to remove part of a number before passing it to an application

I've been racking my brain trying to get my softphone to dial numbers on web pages. I've gotten the browser to pass the number through to the softphone, but it adds tell:+ to the number and won't call ...