-1
votes
0answers
15 views

Python coded batch files

I know this is more suited to Stack Overflow but I'm not allowed to ask any questions there so here seemed like the next best thing. I'm creating a batch file for the first time and don't understand ...
0
votes
1answer
35 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: ...
-1
votes
0answers
21 views

Need Text Line Editing Commands for windows [on hold]

I asked something similar to be do with batch but it didn't work out well (as i need batch only solution). Some suggested SED , TR etc. So i hope to get a solution with these 3rd party exe's using ...
0
votes
1answer
34 views

Windows Batch - Move files to folder parent & Remove empty subfolders

I found several such questions and tried to adapt the answers to my needs but no luck so far. Im trying to create two context menu entries in Windows 7 that would: Move all files from ...
0
votes
1answer
22 views

Assigning a Windows environment variable to a batch variable?

I can't seem to assign an environment variable to another one inside a batch script. For example, this will work: set varA=C:\this\is\a\directory and I can happily use find /I "MyString" %varA% ...
0
votes
0answers
16 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
55 views

Batch Script to Trim lines in text to first 30 or 50 characters only

I am now new to scripts but i find it really difficult understanding "for" command (especially with that tokens and delimiters etc) . Saying so, i think that for command can be used to do what i am ...
1
vote
2answers
73 views

CMD copy specific file types from one location to another

Hi guys im currently working in a school and Ive created a script to scan all student folders for sepcific file types, I was wondering if there was a way I could have it make a copy of the specific ...
0
votes
1answer
24 views

Passing optional parameters in a batch script

I'm trying to write my first batch script and trying to understand how to pass arguments. It's a very simple command which runs fine in cmd. Command: C:\Program Files\Foo> myexe -sd tempVar ...
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 ...
1
vote
2answers
51 views

CMD delete specific files and log all output

Hi guys ive written a script for a school im working at to automatically mount a folder as drive X: and then to go into drive X and recursively scan all folders and sub folders for .bat .cmd .exe and ...
0
votes
1answer
77 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
0answers
25 views

Appending filename and path in Batch file

I'm having a hard time learning how to use command lines and the using batch files. What I want to do is write a custom path and then add the filename so that the output could be saved there. This ...
0
votes
1answer
55 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. ...
1
vote
0answers
32 views

Applications and .bat script get locked in Windows 7 for some minutes

I am playing around with Windows batch scripts and simple C++ applications on a Windows7 64Bit PC. The problem I am facing is that I cannot modify neither the batchfile nor the mingw-exe for minutes ...
1
vote
1answer
37 views

Batch script to take the output of a command and create a variable out of it?

For example, I want to search for a file where /r C:\ "myfile.txt" and then make the output of that command which would be the file path to "myfile.txt" a variable I choose, So then the path to ...
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 ...
1
vote
2answers
90 views

Batch command for Searching & Replacing Text in a Text containing non-TXT file

I am working with iMacro JavaScript .js files which are simple unencrypted lines of code-like text. The file contains the following code: var i; for (i = 1; i <= 10; i++) { iimSet("loop", i); ...
0
votes
2answers
27 views

Not process a variable in a string immediately in batch script

I'd like to know if it's possible to process a variable containing a variable not immediately but only when asked. For example this batch: @echo off setlocal EnableDelayedExpansion set VA=Two set ...
0
votes
2answers
37 views

Can wget decode uri file names when downloading in batch?

Normally when downloading files using wget, the filenames are encoded. In example: wget -c --content-disposition "https://class.coursera.org/ml-005/lecture/download.mp4?lecture_id=1" and the saved ...
-2
votes
1answer
37 views

Loop Counter not working

@echo off setlocal enableextensions enabledelayedexpansion set /a eng_aud_count=0 set /a eng_sub_count=0 For /f "tokens=1-9 usebackq delims=.:^)^( skip=2" %%A in ("MY text File") do ( set trck=%%B ...
0
votes
1answer
33 views

Batch script to only run command for 1 machine

I have a Windows GPO that runs a batch file startup script to disable NetBIOS. It normally looks like this: wmic nicconfig where (TcpipNetbiosOptions!=null and TcpipNetbiosOptions!=2) call ...
0
votes
0answers
42 views

Handle.exe creates Handle64.exe & hangs thereafter

On windows server 2008 R2 ,In a folder I have handle.exe along with psexec.exe and a batch file name test.bat with following content: psexec -s D:\data\handle.exe -p taskhost.exe > ...
0
votes
3answers
79 views

windows command prompt change directory is now changing directory

I am trying to change directory from C drive to E drive. but the its not happening through following code. C:\>cd E:\Program files\wkhtmltopdf C:\>echo %cd% C:\ It says C:\ is current ...
0
votes
3answers
58 views

Create .bat to do a task at a certain time

I'd like to create a .bat file in Windows 8.1 that does a task (specifically, close a program/kill a process) at a certain time. I usually use the command line (which, I believe, works as a .bat ...
0
votes
1answer
59 views

Using a .bat file to pull a string from a text file within a zip folder

So, please bear with me. This is only the second batch file I've ever written and my first post anywhere on StackExchange. I'm writing a batch file that tells a remote server to run HP Array ...
0
votes
1answer
28 views

Could someone explain me the concecpt of “Recursion” in the context of the FORFILE Command (batch)

i'm having some trouble to understand the concept of recursion while reading the explanation for the FORFILE command. for the parameter /s it says in the reference: /s: Instructs the forfiles ...
0
votes
2answers
147 views

Using FORFILES to delete Folders older than 2 days

here is what i'm trying to do: Use the forfiles Command in a .cmd script to delete folders from a specified path that are older than e. g. 2 days on a win7 machine. Edit: The Situation is the ...
0
votes
0answers
53 views

How to change the Start In property via CMD for an .lnk

Context: I have folders with presentations being created dynamically except currently an instance of our ppt&macro is being dropped in each folder with the presentation. The presentation will only ...
1
vote
0answers
34 views

What Would I Call This? [closed]

When I'm working on a web development project or tutorial, I generally open the same applications, just with different files. I wrote a batch file for my current project, so I can open these with one ...
-1
votes
1answer
59 views

What comand do I enter into my batch file to do this?

I want my batch file to find a string in a file and return it to the next line in my batch file. How can I do this? I've googled over and over but can't get the specific answer I need with the ...
1
vote
0answers
77 views

How do i add command to my batch file to go get a screen shot of a webpage and return and save to my desktop?

I'm just learning about batch files and such, and I have been googling round and round trying to find how to create a batch file with a command that will go to my youtube page link and take a ...
0
votes
2answers
104 views

How do I concatenate files using a list and batch?

I need the equivalent of the shell command xargs < list.txt cat -- > compiled.txt as a Windows batch file. There is a directory full of text files (about 50 to 500 files) that I need to ...
1
vote
1answer
87 views

Batch copy gives errors, xcopy works fine

I am writing a general file backup program. It searches the drive for files matching a set of types and then writes them to a folder on the desktop. I wrote it using xcopy on Windows XP but upon ...
2
votes
2answers
136 views

Using wildcards with the rmdir or rd command

Let's say there are some folder in the D: drive: D:\Air D:\Abonden D:\All D:\Whatever I want to delete all folders starting with "A" (including all subfolders and files). I tried this command: ...
1
vote
2answers
56 views

How to kill a process based on the partial content of its window title?

I start a command window with a similar command: start "DUMMYCOMMANDWINDOW" I can then close the window using this command: taskkill /FI "WINDOWTITLE EQ DUMMY*" /f /t What I'd like to do, ...
3
votes
1answer
175 views

Creating a batch OR .bat file to linearize and merge PDFs using QPDF.exe

I am trying to create a batch OR .bat file that will linearize MULTIPLE PDF files. I already have a script I commandeered that uses PDFTK that sends PDFs to the 'sendto' folder where they are ...
0
votes
1answer
329 views

Running Windows Batch File without Popup [duplicate]

I am trying to run a bat file on startup (running Windows 8.1) that will change the permission of the temp folder and then run dropbox. The bat file executes properly on startup and does what I want ...
2
votes
1answer
33 views

How can I add a character to folder names using batch

I've got a series of folders on a Windows server which are a numerical sequence 92001, 92002, etc. and I need to add a '0'at the start of all these folders. Rather than do this tedious task manually ...
0
votes
1answer
208 views

Change registry permission of 3 keys does not work with regini

I'm preparing a batch script that should help me to remove 3 keys from the registry. Unfortunately nobody has permission to edit the keys, except for TrustedInstaller. To execute my reg file that ...
1
vote
0answers
39 views

Batch window's colors are screwd up by Node.js and related commandline services

I run node.js from a batch file and whenever some command that has colorful output it screws up my batch window's default colors. ^ Here it's debug that does it, but any command that has colored ...
0
votes
0answers
27 views

command line needed for creating task with eventID

I want to schedule a task through cmd, the task has to run a .bat file when my WiFi connects. I have manually created a task which does this but I want to do this by command line. I tried this ...
0
votes
1answer
179 views

Schedule a .bat file to run at a certain time/within a certain amount of minutes

How do you schedule a task to run a batch file at a certain time/within a certain amount of minutes? I'd use at 12:34 C:\example.bat but unfortunately the AT command is deprecated.. I'd like to use it ...
2
votes
1answer
96 views

Turn on WiFi radio through CMD

I'm questioning if it's possible to enable your wifi card/antennae/radio with a CMD command, like "wlan enable" or something? I would like to do this so if someone forgot to turn on his wifi, this ...
0
votes
1answer
45 views

how to use Null is Batch script

I working on small program to update the configuration of small program, I'm new to batch script, user need to enter desired input to go to desired program and I have 5 set of programs with in the ...
0
votes
2answers
190 views

Can not schedule a batch file to run at startup [duplicate]

I'm trying to schedule a batch file to run at start up. Here is my command: schtasks /create /tn test /tr c:\simple.bat /sc onstart simple.bat only writes the current time to a file: time /t > ...
0
votes
1answer
248 views

How to end a task from a batch file which is not a process?

I have a batch file which is launching a script (python one). I'm looking for a windows command which will terminate the script. taskkill is working in processes and there is no unique process here, ...
1
vote
3answers
80 views

Batch file - wait for another commands

To activate some commands from mozilla SDK I have to run batch file called "activate". I don't want to find the proper file each time I want to do something with this SDK, so I created batch file: cd ...
0
votes
1answer
86 views

Batch script Issue passing path as paramter with spaces [duplicate]

go.bat @echo off set url=D:\Download\Path with space inside echo "%url%" pause output: C:\Users\Admin\Desktop>go "D:\Download\Path with space inside" Premere un tasto per continuare . . . ...
1
vote
1answer
97 views

Problems using a batch file For loop to feed .tifs into a GIS process (gdal_polygonize)

Thanks in advance for your help with this. I've been reading, experimenting, and banging my head against the wall for a couple days on this, and could really use some assistance. This is my first ...