Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

-3
votes
3answers
19 views

Batch Files make Directory within Directory

How would you create a directory inside of a directory in batch files? I've tried various times and I couldn't get it to work. Please help.
0
votes
0answers
22 views

How can I stop my browser from opening up itself and loading a page when internet is connected?

When I connect to the internet through a dongle (ISP: Tata Photon+/Tata Indicom) it opens up my default browser (google chrome) and logs on to the homepage of my ISP which is integrated by Yahoo!. I ...
0
votes
0answers
9 views

Windows Automated Installation. How can I change boot order in WinPE from a batch file?

Trying to complete automated install of windows OS. I have WinPe on a USB which is first in boot order. I have several batch files running automatically in WinPE making partitions etc. as part of the ...
2
votes
2answers
34 views

How can I make my computer do a repeated series of tasks by a script file on Windows?

When I want to update a web project of mine, I have to do the following tasks all the time: Open cmd.exe. cd into working directory of project. Run localhost command in cmd.exe (~ jekyll s). Launch ...
1
vote
2answers
26 views

Why is SET PATH= not working in the same batch file?

I have a USB flash drive with portable installs of Dropbox and emacs. One of the functions I want to run in emacs needs to have sha1sum.exe in the path, so I also put coreutils on the USB. I am ...
0
votes
1answer
47 views

Is there a way to see what an executed batch file did?

I'm pretty sure the answer to my question is a simple "No", but I'm going to try it anyways. (And a plain No would help me also.) We've got a shared computer. Folks may use it as they do, but they ...
-2
votes
1answer
49 views

How to download from a direct link using batch files and Google Chrome? [duplicate]

I want to create a batch file which is capable of downloading any files from direct links. I already tried this: chrome start ...
1
vote
1answer
65 views

A .bat file to close two services running in background

I have a Windows 7 computer with three accounts (in hierarchical order): Administrator (with password) type Administrator Guest (with a password different from that of Administrator) type ...
1
vote
1answer
45 views

How can I elevate my cmd prompt using the the cmd line

I follow this script "runas /profile /user:administrator\administrator cmd"and when it prompts me for my password it always says that it is incorrect even though i am spelling it correctly. help ...
0
votes
1answer
31 views

How do I make exclamation marks show using echo

Earlier today, I was continuing on making an RAR Password Decryptor. I was testing it out on a test RAR file with the password being just an exclamation mark but when I use my Decryptor all it says is ...
1
vote
2answers
32 views

Wildcard file extensions xcopy

I have some files that need to be copied to a directory on a schedule. All the files have the same name but the extension increments (I have no control over this, it drives me mad) I've tried ...
0
votes
1answer
37 views

Remove Icons from Desktop / Windows 7

New to the site so any advice would be helpful. I am on a computer where the network admin runs some script that continuously puts 2 icons on my desktop. I can delete them and then in a few minutes ...
2
votes
2answers
61 views

how to run bat file as administrator automatically from a non-admin account

My work account is a non-admin but I have the admin password. I need to run a .bat file as admin automatically when windows starts from my non-admin account. I couldn't figure out how to feed in the ...
1
vote
1answer
31 views

Batch file FOR command skipping lines

I need some help with the FOR command in batch filing. What I want to do is read the file "Test.txt" and read only the third line and turn it into a usable variable within this batch file. Here is ...
-2
votes
1answer
37 views

for /f %a in (Y:\el.txt) do move %a C:\Users\srinu\Desktop\test

I am run below cmds in commands prompt for Ex: for /f %a in (Y:\el.txt) do move %a C:\Users\srinu\Desktop\test after that i need result txt file Example:c:\skipped.txt (not moved File Numbers) how ...
1
vote
2answers
49 views

Batch File Pause

I was testing out a batch file and I put in pauses to double check that the script was functioning properly. My question is, if the script encounters a pause, and I alter the script, either add a ...
1
vote
2answers
38 views

Extract Specific Fields from a Multi-Lined Text File via batch-file (.BAT)

I am new to batch-program and my wife asked me to help her to speed up her load. Question is, how will I extract the business date, terminal num(00099106), transaction amount, and commission from this ...
3
votes
2answers
80 views

Command Line : Concatenate multiple files by date

I have got a plenty of .txt files in a directory. The directory also contains .png and some .pdf files. I have successfully concatenated .txt files using this command : @ECHO Off SETLOCAL for /r %%f ...
1
vote
1answer
39 views

Windows Batch to read TXT and parse lines to CSV

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...
1
vote
1answer
30 views

Windows Batch to read TXT and parse lines into JSON

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but frankly I'm stuck. The sample below is from our lab's old radiometer ...
0
votes
3answers
27 views

Batch File to show a Directory List excluding Directories that Start with Underscore “_”

I am throwing together a batch file that will echo out a list of all of the directories in a specific path. I have a few folders in the W:/wamp/www/ directory that start with an underscore _; for ...
0
votes
1answer
32 views

How to make a timer and a loop in a batch file?

I need some help completing my .bat file. So what I wanna do is that after the program has started I wanna leave it running for like 1min then I want it to close the program and then run it agian for ...
0
votes
1answer
55 views

run multiple commands from a file after logging into putty from a bat file

I have written a bat file in which I have the following: putty.exe -t -load "ABC" -l username -pw password -m "C:\Users\pathasai\Desktop\abc.txt" In my abc.txt I have written some commands which I ...
0
votes
2answers
18 views

Suppressing error in batch command if reg

If I run the following: @ECHO OFF FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\SomeApp\Server" /v ServerName') DO SET ServerName=%%B ECHO Server: %ServerName% and the registry ...
-2
votes
1answer
36 views

I need a batch to open an file whenever the workstation is unlocked

So the batch file I need has to open an excel file whenever the password is typed to unlock the computer.I know this thing can be done with Task Scheduler but I need a batch file because this action ...
0
votes
1answer
45 views

Progress indicator in a batch file while tracert runs

I have a batch file that runs fairly quickly, BUT there are a couple tracer's that take forever to run. I want to find a way to show that something is happening (NOT showing the tracert results ...
0
votes
1answer
19 views

Run a command in all sub-folders in a batch file

I have a batchfile that looks like this: IF EXIST icon.ico ( attrib -S -H -R desktop.ini echo f | xcopy /H /Y "%~dp0desktop.ini.txt" desktop.ini attrib +S +H +A desktop.ini ) This works ...
0
votes
0answers
35 views

How to associate batch files with another application rather than default cmd?

I want to associate .bat files with another console emulator, like cmder, so that when executing them they start up with my preferred program. How to do this?
1
vote
2answers
25 views

How do I move files not accessed for a long time using a batch file?

I like to move files accessed for a long time. For instance: if I do not access some file by 7 days, it move to old sub-folder. file1.txt 1 days <keep> file2.txt 2 days ...
0
votes
1answer
19 views

Parameters with spacebars parsed incorrectly for a powershell script run from a batch file

I have a batch file that runs a powershell script and I need to pass two parameters to the script. In my batch it looks like this: powershell -executionpolicy remotesigned -File "my script.ps1" "my ...
1
vote
0answers
39 views

seach for a word in .txt files and write few line into new .txt file

Please help me to create a script to perform task as per described below. i have 2 files. A.txt and B.txt Content of A.txt as per below ITEM name TICKY title nice coffe drink type DRINK ITEM ...
0
votes
1answer
15 views

Script to access same path on different devices

Is there a way to make a batch file that access same place on a different workstation? Example path: \\station1\c$\windows\system32\spool\printers When running the script I want to be prompted which ...
0
votes
1answer
15 views

Program counting minutes from start to stop. and generates txt report.

I have created a batch file based application that installs a number of things on the machine . I would like in this context is a program that I eg can run via batch file example : "start count time " ...
0
votes
1answer
42 views

Batchfile will not exit after running (when more than one spawned)

This batchfile (any all others) will not exit after running when more than one are spawned. I am an experienced MS-DOS/Windows/Java developer and I have never seen this behavior before. Something ...
0
votes
0answers
25 views

Command works in C:\ But not in Users

I am working on a backup program before we image users computers and I want to search for certain types of files. for /r /d %a in (*) do @copy "%a\*.png" "%usr%\file\pic" < All It works great ...
0
votes
1answer
41 views

Can I launch a URL in browser, from scheduler, unless the URL is already open in a tab in the default browser

I'm using the task scheduler in Windows to launch a page in the default browser at a particular time each day. The problem I have is that if the page is already open in the browser, it will open that ...
0
votes
2answers
59 views

Find group of words in a text file and extract the line to new text file

my file ref.txt contains word "hi" "hello" "aloha" as per below: hi hello aloha And I have one more file abc.txt which contains many words including the above 3 words. Now I developed a ...
0
votes
2answers
44 views

Log date and external ip address with curl and batch (Windows)

I am having weird issues where my external IP is changed VERY often as in every 2, 3 minutes. I have a dynamic dns service in place that I update via task scheduler with curl called in a batch file. ...
0
votes
1answer
35 views

.bat that calls AFUDOS to flash BIOS

I've got a .bat file that is supposed to flash the BIOS on my laptop. It reads as follows: @AFUDOS T.105 /p /b /n /e /x /reboot Before actually running it, I would like to unterstand what it does. ...
1
vote
2answers
57 views

How can I force a scheduled .bat job to run in the foreground?

I have a simple .bat that runs a PHP script at the same time every day. @echo ON php C:\path\to\script.php argument pause It runs fine when I double-click the .bat file. And I set up a scheduled ...
0
votes
1answer
30 views

Is it possible to substring an environment variable in a windows 7 shortcut? [duplicate]

If I have an environment variable in Windows such as %username% if there any way I can substring that? I'd like to substring it down to the first 8 characters.
0
votes
2answers
53 views

WinSCP script hangs when connecting to host

I've batch script that runs winscp with script, and sometimes WinSCP hangs when is "Connecting to host". Is it possible to set timeout that WinSCP stops trying to connect and shuts it's self after x ...
-1
votes
1answer
33 views

Grab filename for manipulation

Similar to my request here I'm looking for a way to take the name of a numbered file and use it else where in a batch script. For example, in a folder there would be a file named 159 and I would ...
0
votes
3answers
50 views

Multiline && combinator operator for command chaining in batch file

I see that this operator is used in windows (and might be Linux?) to chain/combine multiple commands in one line. Commands are executed one after another, as long as preceding complete successfully ...
0
votes
1answer
59 views

How to make batch file to open specific Profiles in Google Chrome

I have .BAT batch files to open a set of programs, web pages and explorer windows. With sufficient Googling I've still come up short as how to execute the profile target "C:\Program Files ...
0
votes
0answers
36 views

How to improve a batch file

I wrote the following batch file below in order to clean temp files and clear cache. Problem is that when someone downloads this file he gets a notification that this file may harm his/her computer. ...
0
votes
1answer
46 views

How to run typeperf from batch file?

How to run commands like typeperf "\Process(*)\% Processor Time" -sc 1 from batch file? Ran from command line this command outputs something monstrous, while ran from bat file it prints Error: No ...
-3
votes
2answers
36 views

Create windows script to traverse all subfolders of some folder, and delete a certain folder and all of it's contents if it exists [closed]

here's the trick. Supposing I want to free up some space, and run that script in F:\UnrealProjects, which has a bit over 50-60 subfolders, I would like that script to traverse all of it's subfolders, ...
-1
votes
1answer
33 views

How to delete all files that match a pattern (or older than..) except the newest file that matches the pattern?

I have a scheduled task / script running that takes a snapshot of a file each 3 hours, but the file is growing and disk space is limited, so each week I want to perform a cleanup. As for now I do ...
0
votes
1answer
11 views

How to rename multiple vars that contain FOR counter vars in bat file

Here is my sample: set mail = mymail for /L %%x in (001,1,999) do ( set yourmail = !mail:+%x@gmail.com :: other commands here ) I want the result be like: mymail+001@gmail.com ----> ...