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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Move files into specific folder in a folder directory if empty [on hold]

Batch file that can Move files (Files are all in a folder) into specific folder in a folder directory if empty. I want to make a batch file that can move files into a specific folder/directory if ...
1
vote
0answers
29 views

CMD install based on OS type and architecture [on hold]

I am looking for a way to do a CMD install based on OS type (XP, Vista, 7, 8) and architecture (x86 or x64). So for an example if the script detects the OS is Windows 7 x86 (regardless of ...
0
votes
2answers
41 views

Batch file rename with random alphanumeric

I am looking to rename a bunch of images (all with .jpg extention) with random alphanumeric names. Example would be 08kDRH1s.jpg or 0FwzUc3.jpg. Doing some searching I did find a few batch scripts ...
0
votes
0answers
13 views

Batch-file pseudo random

Is there a way to do pseudo-random in batch? Simple random is very bad for my program. It's better to looks like: call:random var 1 100
0
votes
1answer
39 views

Simple batch file fails on Windows Server 2012

On a Windows 2012 Server, from a logged-in Administrator (local and domain), created a batch file "test.bat" by redirecting console input into a file: echo Hello When run from PowerShell cmd prompt ...
2
votes
4answers
47 views

Batch file. Variable in variable

How to use variables in variables? This code: set newvar=%var%var2%% doesn't work. So, what to do? I can't write my program without it.
0
votes
1answer
35 views

Batch file. If statements in if statements

I am trying to write this code: If %dropmode%==on ( If %drop% LEQ %potiondrop% ( set /a potion=%potion%+1 ) If %drop2% LEQ %potiondrop% ( set /a potion=%potion%+1 ) ) So, condition "if %drop2% LEQ ...
0
votes
0answers
15 views

assign drive letter via batch fil based on label

I need a script which would change the drive letter to e.g. P:\ of an USB drive named e.g. "MY_VOLUME". I know this is somehow possible with diskpart /s script.txt > output.txt (using: "list volume" ...
0
votes
0answers
24 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 ...
1
vote
1answer
25 views

Windows 7 batch file to read filenames from a text file and create the file

I have a text file which will have one filename per line. I want to run a batch file that will; - read a line - test to see if the file exists in the current directory - if not, create the named file ...
0
votes
1answer
27 views

.bat file to create a Library with icon in Windows 7 and 8

Is it possible to create a .bat file that creates a Library with an icon in Windows 7 and 8. Of course this can be done by following the already created tutorials online like Change Your Windows 7 ...
0
votes
0answers
2 views

Stuck in infinite loop after executing oracle export in java? [migrated]

I have been searching through net, how to make proper export using exec in java. Here is the code I am use for that: private static void execute(String string) { // TODO Auto-generated method ...
-1
votes
1answer
31 views

I still use MS DOS style batch files (.bat) What should i be using these days, instead? [closed]

Surely there better substitutes out there for this kind of simple scripting on windows? I've tried googling but just get stuff about editing old batch files.
1
vote
1answer
23 views

batch script to swap words / rename files

could someone help me please? I have win xp and bunch of e-books named like this: Title - Name Surname.mobi and I need a BAT file to get: Surname Name - Title.mobi I am almost able to swap what´s ...
-1
votes
1answer
39 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 ...
0
votes
0answers
22 views

Prevent Firefox's “Well this is embarrassing” screen from appearing at first login only

My parents have Windows 7, Firefox 30 and two user accounts which they regularly flip between and then shutdown the computer. As a result the "well this is embarrassing" page appears frequently when ...
0
votes
2answers
78 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 ...
0
votes
1answer
45 views

how to batch change date created to date modified

I have many video files ending with extensions mov, avi, mp4, and mts. I need to change their "date created" to their "date modified value" I tried using the following powerhsell script: ...
2
votes
2answers
53 views

Start program, wait until it outputs certain string, then continue

I want my batch script to run a batch script, which doesn't terminate, then run several more batch scripts, which do terminate, and then close the first batch script. The issue is, the first batch ...
0
votes
1answer
25 views

Get size of a file and save it to a variable in Windows console?

I'm making a windows batch script, I need to get the specific size of a file so I can Insert that and other values I already got to a database, but I just can't figure out the proper way to do it. ...
0
votes
2answers
49 views

Automatically reboot Windows8 if no internet activity

I have a media server located in a very inconvenient part of my house. Occasionally I will have to reset my router or it will reset itself. The issue is the PC loses connectivity for some reason, and ...
0
votes
0answers
15 views

How to save a document and close it after the save

Currently I have a .bat file that opens a program, opens a document and then reloads this document so it contains new data. After that I need a timeout so it can run some other things within the ...
1
vote
0answers
31 views

How to open a webpage if it isn't already open, and if it is, switch to it instead?

I am currently executing this command in my batch file "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://localhost" to open up my page in Internet Explorer after generating it and ...
0
votes
1answer
83 views

How to automatically enter username and password for network location in batch file?

I have a batch file that copies files to a network location on WebDAV. The address looks something like this: \\xxxxxxxxx.net@SSL@2078\DavWWWRoot When I restart my computer, the batch file doesn't ...
1
vote
0answers
31 views

Windows / Create txt files of subfolders with file names in it

I have a folder on my HDD that contains like 1000 or so subfolders. These subfolders contain files and sometimes more subfolders. Now what I want to have is a script that creates a .txt file for each ...
-1
votes
1answer
19 views

Is there a way to read a simple one line asp page using a batch file?

I have a simple asp page in which i write an ip address, and nothing more. Now i need a batch file to read the contents of this page and pass it to a variable. I'm not good with batch files but ...
-1
votes
0answers
21 views

How to load a URL only if it exists in a batch file using curl for windows?

I am trying to shutdown a service running running locally by using URL like 'localhost:3502/shutdown' using curl. I give curl 'localhost:3502/shutdown'. But I need to do this only if the service is ...
1
vote
0answers
62 views

Running Batch file from servers network share - using servers local user account

I am trying to create a script that could be run from servers network share and promt me to type servers local username and password as credentials. So, .bat file is located at ...
0
votes
1answer
50 views

xcopy command does not work in a batch file

The command below works in CMD Prompt, but does not work in a batch file. xcopy "D:\Desenvolvimento\Repositórios GIT\driverXD\app\*" driverxd\ /e
1
vote
1answer
59 views

Is there a script "to log remote users off and after log them off to delete their profiles?

I found 6 simple scripts (.bat and .vbs) for remote pcs (Win XP and 7) to Clean Profile properly and faultlessly: Script: sending Ping to check Remote PC On or Off (.bat) Script: checking who logged ...
0
votes
1answer
69 views

7z in batch file with variables “Incorrect command line”

I'm trying to run the following batch file: set HH=%time:~0,2% set HH=%HH: =0% IF %time:~0,2% GTR 5 ( IF %time:~0,2% LSS 21 ( FOR /F "TOKENS=1 DELIMS=:" %%A IN ('TIME/T') DO SET HH=%%A XCOPY ...
0
votes
1answer
28 views

Kill all internet explorer's belonging to the current user

What's the proper way to shut down all of the instances of internet explorer for the current user using batch commands? I have this. There can be multiple users logged into the same computer. What am ...
1
vote
1answer
53 views

CMD Command to create folder for each file and move file into folder

I need a command that can be run from the command line to create a folder for each file (based on the file-name) in a directory and then move the file into the newly created folders. Example : ...
0
votes
1answer
87 views

Script to enable/disable IPv4 on a specific network adapter Win 7

For reasons I don't wish to get in to at the moment I need to occasionally disable Internet Protocol Version 4 (IPv4) on my wireless card, then enable it some time later. Currently I go into the ...
0
votes
1answer
43 views

having problems clearing a directory and uploading files via a batch file

I am running Filezilla-Server on a Windows 2012R2 Standard server. I am attempting to ftp in and send files from another Windows 2012R2 Standard server. I am running this batch file: @echo off cls ...
3
votes
1answer
97 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
0answers
53 views

android.bat is not recognized as an internal or external command

I have setup up the environment for cocos2d-x. I have edited the create-android-project.bat file according to my Cygwin, SDK and NDK locations. Now when I try to create a new cocos2d-x project double ...
1
vote
1answer
56 views

Opening a text file in notepad++ and refreshing it at regular interval of time using a bat file

i want to open a text document in notepad++ through bat file which i have achieved . this is the command i am using to open a file. %SystemRoot%\explorer.exe "D:\path of file\file.log" Secondly as ...
0
votes
1answer
41 views

Need help creating a .bat file to execute SAS jobs

Using Windows 7, I need a .bat file that will execute files in a folder whenever I put them in there. for example I want it to execute files with a .sas suffix and then rename them once executed. I ...
0
votes
1answer
73 views

Adding prefix to bulk filenames in batch file

Ok so i am trying to add a prefix to all filenames in a folder. After a couple of days of searching the internet I actually came up with something that worked perfectly....almost!!! echo ...
0
votes
1answer
19 views

Needing advanced ID3 tag handling for specific situation

My situation is probably quite rare and complex, so I'll explain it in detail. Many years ago, I put together a hand-selected collection of MP3s, which ended up taking a month or so and is now at ...
0
votes
1answer
45 views

Renaming all file in a directory older then 1 day

I want to rename all file in a specified folder ending with .txt to .csv that are older then 1 day. I have the following that will get me all files ending with .txt and rename them to .csv For /R %1 ...
0
votes
2answers
73 views

Move 1 file at a time based off timestamp using windows batch utility

I am trying to build a .bat file to move files from 1 folder into another one, based off of the oldest time-stamped file. Folder 1: Filename: Date Modified: test1.dat 5/12/2014 4:03pm ...
0
votes
1answer
47 views

Write a .bat file to select a certain portion of an output of a batch command into a batch file variable

If I run the following command on my windows 7 system (where cable is the name of my network adapter) netsh interface ip show ipaddresses cable I get the following result: Address 10.17.179.17 ...
0
votes
1answer
17 views

Check if an user has given as an input 1 or more then 1 in an batch file

I am having an question with an Batch file Is it possible to let an user choose how many files it will enter? For example set /p count=Enter the number of files you are willing to set: IF %count% ...
0
votes
0answers
28 views

Get directory by filename

My batch script receives a filename with full path (eg.: C:\...\file.c) as first argument. I need to get the directory of that file and go to the directory, much like: cd C:\...\ How do I do this? ...
0
votes
0answers
73 views

Getting a batch file to run windows 7 psr tool

I'm trying to run the Windows 7 problem steps recorder tool on a remote computer using screenconnect. Screenconnect allows you to quick launch files remotely, so I'm using batch files. The goal is to ...
0
votes
0answers
36 views

Windows filename formatter BAT script?

At work we upload files for publishing to the web. The filenames people use are atrocious. Is there something easy out there like a .BAT file that they can drag the file on to to have it clean up the ...
0
votes
1answer
36 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
115 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 > ...