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

learn more… | top users | synonyms (1)

0
votes
2answers
12 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
12 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
15 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
15 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
30 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
34 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
22 views

Figure out process details from 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
38 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
20 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
19 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
21 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
34 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
15 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
53 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 ...
-2
votes
0answers
23 views

How to disable internet access for another PC

I want to disable the internet for my little brother after 6:30 PM to improve his grade. I found that I can schedule a task and run this script: netsh interface set interface "Ethernet" ...
-3
votes
0answers
26 views

Batch to extract a number from a string inside an existing text file into a new one

I have a file *.idoc (text file) like that: [Image = B4montage690x0000.tif] TiltAngle = 0.000488 PieceCoordinates = 0 0 0 StagePosition = 111.069 -753.257 Magnification = 690 Intensity = 0.787 ...
4
votes
3answers
112 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
50 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
50 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
48 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
24 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
48 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
38 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
19 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?

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
63 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
48 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
27 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
32 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 ...
-2
votes
0answers
29 views

Check if each file in a list exists

I have a .txt with a list of name files: 111.pdf 222.pdf 333.pdf ... I need a script that checks if each of these files exist in a given folder, e.g. c:\files\. Is this possible?
0
votes
1answer
67 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
65 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
12 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
124 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 ...
-1
votes
0answers
14 views

Windows SUA, Batch File replacement

what i miss most from *nix OS's are shebangs and especially dislike batch files. But jumping into an SUA interactive shell is sometimes an extra step I would like to skip. Can we have windows ...
0
votes
1answer
39 views

Batch file in windows scheduler

set PATH=C:\Users\... call date2.cmd md %DT_MM%-%DT_DD%-%DT_YYYY% cd %DT_MM%-%DT_DD%-%DT_YYYY% So, I set my path to the folder that has PSFTP for me to run and run a file that will get the current ...
-1
votes
0answers
35 views

Windows script to copy files from C:\ to Backup B:\ but leave a SYMLINK copy back on C:\

I have a particular way to "backup" my stuff, in that I copy everything large (movies) etc from my main drive C:\ to an external backup drive B:\. Then make a SYMLINK of the file on B:\ back to C:\, ...
0
votes
1answer
29 views

Run a block conditionally on grep output

I've found a number of solutions to this problem, but unfortunately none of them seem to work on my windows box. I'm running a FOR loop in a batch file to loop through a number of text files. For ...
0
votes
1answer
73 views

Windows batch file - How to pipe output to text file and then open the text file?

I have a weird problem where I have a simple batch file that runs another batch file, outputs what is on the screen to a log file, and then attempts to open the log file. The problem is, the log file ...
1
vote
1answer
38 views

How can I write a windows batch file that opens a command prompt and executes a command?

I want to create a .cmd file that opens the command line at a location relative to the .cmd file itself, and then executes something like this: someapp start ../../config.js How can I do this?
0
votes
1answer
35 views

Writing time in a file in a for loop

In windows 2008: I'm trying to zip and copy files to a backup server. I use command line/batch file, I log the result in a log file, I now want to log also the time for each file looped. The ...
0
votes
1answer
53 views

Batch Issue - Creating folders and Moving Documents

I’m trying to create a batch script in Windows 7 that will look at the first 6 numbers of 100s of pdf, create a folder based on the 6 unique numbers and move the pdfs into their respected folders. ...
0
votes
1answer
32 views

Batch file XCOPY cannot find existing directory

I'm writing a small batch file to copy my C# project to another drive. I'm using XCOPY to copy an entire folder (We have some XP machines still, so robocopy isn't an option). However, when I run the ...
6
votes
3answers
545 views

Is it possible to automatically run a batch file as administrator

I am wondering whether it is possible to automatically open a batch file as admin when you double click on the batch file, because the commands need to be run with administrative rights. Note: I ...
0
votes
0answers
12 views

How to hide cmd window of a Calibre Content Server batch script? [duplicate]

So I manage to be able to share more than one Server Content at the same time with the same PC. If someone want to know how can I do this, is easy. Make a batch script and put this: @echo off ...
0
votes
1answer
111 views

How to send mail from a Windows batch file

I want to send a mail from a Windows batch file. Here is my code: blat test.log -server smtp.gmx.com -to dest@gmail.com -f address@gmail.com -s "test mail" -u "address@gmail.com" -pw "password" ...
0
votes
1answer
57 views

Windows scheduled task - .bat runs forever

I've a scheduled task to clean up folders on a hard drive automatically; it removes files older than a certain amount of days. Basically it runs a .bat file full of lines that looks like this: ...
0
votes
0answers
66 views

Windows batch script: Manual power up vs Wake on Lan (WOL)

OK, I have a (win 7) desktop computer with WOL set up so I can turn it on remotely, it works fine. Next thing, on this computer I have a batch script, which runs at startup and starts various apps, ...
0
votes
0answers
22 views

How to install the tool(exe) and change settings in it using batch file?

I want to run the installation(which is a single step procedure) of one of the tool(exe file) then in that tool,select File -> Settings and do some settings(select one option(which is a Radio button) ...
1
vote
1answer
108 views

Executing a BAT file as a domain user from a service in Windows 7

Firstly a few basics: I am running a database server application which runs as a service ServiceA. ServiceA is installed on Server1 and Server2 ServiceA only runs on one of the two servers at any ...