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

learn more… | top users | synonyms (1)

1
vote
2answers
18 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
13 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 ...
-2
votes
0answers
28 views

I Need BAT file to perform actions, and also write echos and actions to a log file [on hold]

I Need BAT file to perform actions, and also write echos and actions to a log file... In other words: Whatever is "written in the BAT file", should be sent to the log file, as well as the actions ...
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
14 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
37 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 ...
-2
votes
0answers
23 views

I need a batch file to copy a template folder and rename next in sequence

We have folders for each new assignment that comes in to our office, eg. 15-P0001, 15-P0002, etc. There are multiple folders within each assignment folder. We have a template folder named 15-P0000 ...
0
votes
0answers
22 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
33 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
37 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
32 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
24 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
33 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
26 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
31 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
29 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
39 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
47 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
19 views

“Password Expired” when attempting to access Win7 machines on local network with our local admin account [migrated]

Looks like all of our Win 7 and Win 8 machines were somehow set to expire the admin account that we created locally a couple months back. Now we're trying to make sure we either have to go to ...
0
votes
0answers
26 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
41 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
31 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
31 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
9 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 ----> ...
0
votes
1answer
59 views

Rename files using batch file

I have been searching for a way to rename 150 files daily simply by executing 1 command. The current files are in the same folder C:\reports. The file names differ and the only change I have to make ...
0
votes
0answers
27 views

Task Scheduler running a bat file that duplicates screen

When you lock a computer on windows 7 your login screen appears on your main display and then on other monitors it is completely black, when your displays are extended. This problem is fixed when you ...
1
vote
1answer
29 views

Bulk Download Images with Organization

I have a list of URLs (pretty much all image urls though some pdf) that I need downloaded. I have found a variety of options for bulk downloading and these would work but I need them to be organized ...
0
votes
0answers
16 views

Email alerts using Blat command

I tried to use below blat command to configure blat in command prompt for sending email alerts. --blat -install SMPT.XXXXX.com NAG@mail.com -but is is showing below message "Blat is not recognized as ...
0
votes
1answer
58 views

Running .bat file in zsh (in Windows)

On a Windows machine I want to avoid using cmd.exe at all cost. I'm trying to use babun (mintty 1.1.3) to run a batch file in a Windows folder. This works: { ~ } » ./file.bat -o /path/to/files.xml ...
0
votes
2answers
19 views

How to restrict changing env variable locally by batch file

I have two batch file x.bat and y.bat. I m calling y.bat from x.bat. File y.bat sets an env variable like: set ABC= Restriction is I cant change this Y.bat file but I want my variable "ABC" to be set ...
0
votes
1answer
31 views

How to Access “My Computer” files from Command Prompt

I'm trying to figure out how to access files on "My Computer" from the command prompt. In particular, I want to access files on my phone's share, e.g., My Computer\SAMSUNG\Phone\somefile.txt. That ...
0
votes
0answers
33 views

My batch files keep instantly closing, and there is no .bat association under FileExts

I am trying to launch a batch executable, but my PC shows no .bat association in the registry. Recently, I started off by simply modding my Star Wars: Battlefront 2 game. Eventually, it asked me to ...
2
votes
1answer
292 views

FreeDOS AUTOEXEC.BAT

I am using a FreeDOS floppy boot disk made from sys.com of FreeDOS (I am using them on virtual box and floppy disk is virtual). I have wasted all my day trying to make an AUTOEXEC.BAT which loads ...
0
votes
1answer
39 views

Using Win8.1Pro Batch: Unable to verify if BitLocker has already applied encryption

I'm working on a script that assists in standardizing a Windows 8.1 Pro image. In this part I'm trying to verify if BitLocker has already encrypted the drive or not using the following script: ...
0
votes
1answer
40 views

Windows 8.1 batch checking if computer is part of a workgroup and changing if necessary

I've got SYSTEMINFO | FIND /I "DOMAIN:" which displays if it's part of a Domain or Workgroup. But I'm trying to figure out how to take the result of that and if it's anything other than Company.LLC to ...
0
votes
1answer
13 views

How can I set the default Windows8 default open file to insert the file name in a command line oneliner?

When I double click files of the type .xise, I need my system to execute the following: C:\Xilinx\14.5\ISE_DS\settings32.bat C:\Xilinx\14.5\ISE_DS\ISE\bin\nt\ise.exe PATH\TO\XISE\FILE\filename.xise ...
2
votes
1answer
58 views

Batch why <nul breaks my file

Well guys i am basically trying to get user input and type it on the batch I will be using backspace and enter so i cant use choice Thats why i am following this method To capture characters as ...
0
votes
0answers
21 views

Send dynamic argument to an application through its shortcut

I am trying to create a shortcut link which will run/open Command Prompt (cmd) as Administrator having present working directory (PWD) set as the supplied folder path. What I have done: Created a ...
0
votes
2answers
191 views

Opening random file from folder AND subfolders with batch script (Windows 7)

I want to get a bat file that will open a random file (with any extension) from a specific folder, but also open files in all subfolders within that folder. There's another question that asked ...
1
vote
1answer
53 views

How to answer batch file [closed]

I lost my administrator right's in recovery. I learned of the super administrator surfing the net and got access using command line. I got a reply :The syntax of this command is: and then it list's ...
0
votes
1answer
37 views

Getting missing operator error in my batch decryptor

This decryption program gives a load of missing operator errors. What is wrong? @echo off setlocal EnableDelayedExpansion ::OS_sertificate set code=494715842 set /p sertificate=input set ...
0
votes
1answer
65 views

Turn ON display with a batch or powershell

We have a computer connected to a large vizio flat screen that displays secure information and it is always on. I have a script running with task scheduler to shut off only the display at a certain ...
1
vote
1answer
29 views

How do i copy a specific word/number from a TXT file using Batch?

I need to search for a specific nubmer that comes after a string in a text file. For example I have this data: yyy = 80rr, xxx = 136rr, zzz = 95rr and i want to copy the numbers that between ...
0
votes
2answers
31 views

Split command output in batch

I have this command that gives lists of directories and their filepath: for /d %%D in (C:\OS\system\DisplayLanguages) do echo %%~fD I need to separate the last part of the output eg. ...
1
vote
1answer
40 views

Special characters in batch

I'm using windows 7, and I'd like to create menus, progress bars, etc. with special characters like this. How to do this?
1
vote
1answer
35 views

Add item to “New” context menu in Windows 8 for only one user without admin rights

I am trying to edit the registry on my windows 8 computer so that I can create a batch(.bat) file from the "new" menu. The only problem is I don't have admin rights. So I was doing some research and ...
0
votes
1answer
43 views

Can Windows XP use net send command to send a message to a later version of windows?

The net send command can only be used in Windows XP or earliar versions. But can a Windows XP computer send a message to a later version of windows using the net send command?
1
vote
2answers
32 views

Mac Terminal File Rename Randomly

What is the best way to rename files for example .JPG & .jpg at the same time. I have looked on here and google and come across things like below but is there a way to cover both? Script: for i ...
0
votes
0answers
34 views

appending folder name to filenames

please help me with this: for a file structure in a parent folder (say "C:\Folder 1") that contains: Folder A\File a.txt Folder B\File b.txt I would like to prefix the folder name to the ...
2
votes
3answers
226 views

Windows 8.1: Restore .bat file association to default

A few weeks ago I accidentally changed .bat files to open with Notepad++ (a fairly common issue I believe). On Win XP and Win 7 I had a .reg file that updated the relevant registry keys and sorted out ...