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

learn more… | top users | synonyms (1)

-1
votes
1answer
16 views

How can I loop through all sub folder of FolderA and execute a command do check modified files

I have a cvs client through which I can get list of modified files within a directory. For example: My workspace(Top folder) -" D/MyWorkspace" My Project A(Sub Folder) - D/MyWorkspcace/AProject ...
0
votes
1answer
20 views

Is there a way to reverse lookup which executable is being called?

I have multiple JDK's installed on my machine and I'm running on a system that has a pretty long path environment variable. Is there a way to see what my call to java resolves to? I'm looking for ...
0
votes
0answers
19 views

General-purpose For-Loop Windows batch command with User Input

How can I use as "input" over each file in a directory using a for-loop as "output" in its subfolder? I think the answer of this question will be very helpful, so I will give general-purpose example: ...
0
votes
1answer
12 views

Append Text to all blank files in a folder

I have a folder containing blank files, all the files have a .BAK extension Now I have a batch script that needs to write arbitrary text top each of the blank files, and I am using the following: ...
2
votes
0answers
26 views

Why are some .bat files “run as an administrator” bold in Windows 8?

When I right click on some .bat files the "run as administrator" selection is bold. Why is this? How do I make it so that all .bat files act that way too?
0
votes
1answer
45 views

How can I apply quotes to a URL in a .bat script?

The general form of a curl command in CMD that works is: curl -o latest.dump -L ...
2
votes
1answer
16 views

How to change directory to unknown subdirectory

I'm writing a short batch program to copy *.doc The files are in directories where it's name can be changed. In each directory, only have one folder only. If in DOS command window, i'll just key-in ...
0
votes
1answer
21 views

Run a command in a batch file on the system clock

I have two different connection for my internet connection. The first uses from 7am to 10pm. The second uses from 10 pm to 7 am the next day. And for each of the connections I've made a batch file ...
0
votes
2answers
26 views

Pass shortcut arguments in .bat (batch)

In a .exe shortcut, I can use extra arguments. But how to pass those arguments in a .bat file?
1
vote
1answer
31 views

How to write into a Log file from the batch file?

I have a batch file that triggers process in Access database. I'd like to write into a log file (just some *.txt file saved in the same folder) time when before the process started and after it was ...
0
votes
0answers
17 views

Associate files with batch script [duplicate]

I've got a .bat-file which expects an input file as a command line argument, i.e. script.bat input.key I associated .key-files with script.bat in Windows and I excepted the same behavior like I ...
2
votes
2answers
64 views

Batch File to start .exe when a specific number of files is in monitored folder

I am trying to write a batch file that will trigger an exe whenever there are exactly 4 jpg images in a folder. Afterwards the images should be deleted. I have got it to work it seems, but the file ...
-1
votes
2answers
57 views

Windows 8.1 - How to open a batch from a batch with different admin privileges?

I must run a bat which calls a program. Problem is I need to run the BAT as admin and call the program WITHOUT admin. I don't know why but it I call the program as admin it gives me a path error when ...
0
votes
0answers
23 views

Windows script to toggle automatic configuration script checkbox without removing any existing string value

I'm trying to create a bat file to toggle the automatic configuration script checkbox in Internet Explorer (see red box in screenshot)...but without removing any existing value in the related textbox ...
1
vote
1answer
31 views

How to list specific dated folders in a root folder to use with wzzip (winzip) command line in my batch script?

What I am looking to do is, using winzip command line (wzzip) inside my batch script, and zip any folders that have 201409 (That is Sept 2014)(for example) in the folder name into one zip file. There ...
0
votes
1answer
30 views

FOR, IF and SET all are not working together

SETLOCAL EnableDelayedExpansion FOR %%A IN (1 2 3) DO ( IF %%A EQU 1 ( SET CHOICE1=ABC ECHO CHOICE1=%CHOICE1% ) ) Output: CHOICE1= Why is CHOICE1 not getting set?
0
votes
1answer
24 views

String replace inside a for loop in bat script

The replace is go well in this script. I am trying to make it dynamic. SETLOCAL enabledelayedexpansion for /f "tokens=* delims= " %%a in ...
1
vote
0answers
45 views

Creating an account creation script to create new users in Windows Server 2008

I need to be able to make an account creation script that will create a new user in the Domain Users group, set its password, roaming profile, and login script. The input will be first name, last ...
2
votes
1answer
83 views

Windows cmd output redirection to standard input ( >&0 )

From a question on Stackoverflow, i've being testing with redirection from/to stdin stream. And this tests, trying to send data to the stdin stream, just to see what happens, end with an apparently ...
0
votes
2answers
36 views

Run other cmd in bat like from it's own path

I need to run bat(fix.bat) in cmd batch file (let's say sample.cmd on c:) The problem is that despite of using: start /WAIT cmd.exe /C D:\dev\sys\fix.bat fix.bat runs like from parent command ...
0
votes
0answers
15 views

Want to write batch script on the basis of system date and exit code

This is MY first question in this forum, Hope any one of you can fix the issue.. I have one log file containing the pattern as below "abcd.job" (abcd.bat) Started 27/8/2014 5:00:00 AM ...
0
votes
0answers
19 views

command for running script?

I was wondering what command would get the batch file to read a seperate text file and use all of that code in a database.. if that didn't make sense I'll do my best to explain: I have a text file ...
0
votes
1answer
55 views

Batch file to read a file and create a JSON?

I have a text file with some dozens of entries in the following format: code: SETX id: 1 msg: Message for setx code: SETY id: 2 msg: Message for sety msg_ja: Japanese message for sety As you can ...
-1
votes
1answer
59 views

How to rename 7-Zip split files as name_00N.zip instead of name.zip.00N

On Windows, when I create .zip split files with volumes less than 20MB with a command like: 7z a name.zip files\* -v20M I get one or more files named name.zip.001, name.zip.002, etc. I need to ...
0
votes
1answer
50 views

.bat file to rename files (not bulk)

I take pictures of airplanes. When i put them on the computer they are named DCS_5678 (or anotrher number :p ) The way i catalogue my pictures is by renaming them as followed: ...
0
votes
1answer
47 views

Parent process details from the batch script - find out what called the batch script

We have a batch file which is calling php scipts. Php script load some data files to our system. I cannot understand what is starting that batch file in the middle of the night. I cannot find any ...
1
vote
2answers
94 views

BAT file: Delete all files in directory older than 5 days except one file

I have a directory with many temp files. All files older than 5 days can be deleted except one file 'DoNotDelete.txt'. Therefore I should add an extra argument to my current script: forfiles /p ...
-2
votes
1answer
23 views

bat file to move parent folder ONLY containing PDFs into a new location and then delete the old parent folder

I need the bat file to scan a directory and look at all of the subfolders. If a subfolder contains any PDFs then I need that parent folder to be moved into a new location and then deleted from the old ...
0
votes
0answers
20 views

Start applications on specified screen at startup (Windows 8)

What I would like to do is have all my programs that start on startup to popup on predefined screens. Now, since we configure applications to start on startup by adding a shortcut to the startup ...
0
votes
1answer
33 views

Start a program after waiting for user input

I'm writing a .bat file, and I'd like to start a program after waiting for the user to press any key. I tried the command below, but I got and "Invalid syntax" error: timeout /t -1 foo.exe
1
vote
0answers
45 views

.bat script doesn't work by using window scheduler

i created a .bat script to perform daily folder compression. it is working fine when i double click the .bat file. However, it doesnt work when i include it in window scheduler. Below is the script: ...
0
votes
0answers
21 views

Prefix commands in batch

I am using a batch file to run Grunt with some console customization. I was wondering if there is a way to add grunt and a space to the commands I enter into the console. Here is my batch file: CD ...
0
votes
1answer
64 views

How to start a cmd window and issue tail request in a bat file?

I can open a cmd window and start a tail by entering something like this: tail -f C:\Oracle\WebCenter\Sites\11gR1\Sites\11.1.1.6.1\logs\sites.log This is probably a stupid question, but how do I do ...
4
votes
3answers
166 views

Use DOS batch to move all files up 1 directory

I have created a batch file to be executed through the right-click menu in Win7. When I right-click on a folder, I would like the batch file to move all files (excluding folders) up 1 directory. I ...
0
votes
1answer
84 views

Replace FTP with SFTP to transfer files - PSFTP.EXE ONLY

I am currently FTP'ing file to a unix box from a windows server. I want to change the following section of the script and migrate the ftp process to be sftp. @echo off echo user %user%> ...
1
vote
1answer
60 views

How can I move files into a folder based on their name?

I have several .pdf and .tex-files in a certain folder "ABC". They all are named by the scheme C01S02_Word.pdf C03S02SS01_Description_random_words.pdf C04S01SS02_More_words.pdf and so forth C in ...
1
vote
0answers
70 views

APC Smart-UPS 1000VA - command file won't get executed

I've got this old piece - http://goo.gl/5M37Sc, working reliably so far, but it has one big problem: command file when power is down won't run. Everything seems to be configured correctly, but when ...
-1
votes
1answer
26 views

Export windows Environment variables to a file. [duplicate]

Can we write a batch file to export all or some environment variables to a file in windos 7?
0
votes
0answers
57 views

Batch file needed to query a specific location

I am not a coder and would appreciate any assistance. I need a batch file which will query a NAS location and produce an output of the upper level directories (and maybe the second level down). The ...
1
vote
1answer
122 views

running batch file within powershell

I'm running a batch file within PowerShell. It calls up another program to do a bunch of maps which it outputs to a subfolder called "GRD" I then want to rename the files in the GRD folder by adding ...
0
votes
0answers
22 views

Copy multiple files to folders. Use filename

How do I move multiple selected files to folders with using the filename? Any tool or cmd is welcome :) One file a time: press Win + R and type in shell:sendto create a new textfile in this ...
0
votes
0answers
22 views

How can I start a batch script before open some type of file? [duplicate]

I'm writing some custom lock file system for my company. I want to start my lock_engine.bat before open some type of file. for example here my bat: @ECHO OFF set FILENAME=%~nx1 echo. is locking ...
0
votes
1answer
119 views

Batch rename all files in folder to uppercase

Is there a way to rename all files in a specific folder to uppercase? I found this code but it renames files to lowercase, can it be modified to change to uppercase instead? for /f "Tokens=*" %f in ...
1
vote
2answers
55 views

.bat file doesn't work with comments at top?

I have a .bat file I made to combine multiple files into a new file and it previously looked like this: copy /b ^ E:\file1.txt+^ E:\file2.txt+^ E:\file3.txt ^ E:\output.txt :: comment That worked ...
0
votes
0answers
56 views

Replace “open command window here” to open git sh.exe bash

Is there a way to replace the default option in windows context menu to open command window in the current directory to open git's sh.exe bash in the current directory?
0
votes
0answers
65 views

Remotely use a local account to unlock another local account

So I have had an interesting problem pop up. I am trying to make someones life easier by making a script to help reset local accounts on windows 7 machines. Ideally, we'd like to do it remotely, so ...
0
votes
1answer
182 views

Windows Batch File (WMI) - taskkill process based on memory usage

Is there a way using WMIC, bat files, or powershell, to kill a task with a particular task name if the amount of virtual memory the process is using is above a certain limit? Specifically I want to ...
2
votes
1answer
155 views

Opening local batch file from Chrome bookmark

I have a batch file located at C:/bat.bat on the C drive of my Windows 8 system. I created a Chrome bookmark that points to the URL file:\\\C:\bat.bat. When I click the bookmark, Chrome shows the ...
0
votes
0answers
17 views

Error in Creating Android Project Using Cocos2d

When i am trying to create the project using cocos2dx i am getting this error of cygwin.Even though my path is correct for cygwin which is C:\cygwin\bin.My project is created but it is missing few ...
1
vote
2answers
187 views

bat file behaves differently when run from windows scheduler

I have a .bat file S:\BACKUP_db\copytofileserver.bat, which takes some files and zip them to the network drive. Its first command is to delete the old backup at specific network path, then pack the ...