Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
1answer
59 views

How can I remove similar lines from a text file (image listing) using batch, Jscript (JREPL ?) or vBScript?

The environment is WindowsXP (possibly upgrading to Windows7 soon). I am allowed to run scripts but NOT allowed to install tools. Pure batch has generally failed due to performance issues or ...
0
votes
1answer
24 views

Why is my .bat file doing a infinit loop?

I've created a .bat file for running my cwRsync script. From CMD line, this works great: rsync -avz ./ {destination} --chmod=ugo=rwX --rsh "ssh -i id_rsync -p 9672" --recursive --delete Now, If ...
-1
votes
2answers
45 views

How To Run A Complex .bat file

I am running a Minecraft server from Windows, and the .jar that starts the file is located at C:\Users\David\Server\bin\pw\prok\KCauldron\1.7.10-1614.200\KCauldron-1.7.10-1614.200.jar What I do to ...
4
votes
1answer
34 views

Why is the “set /p”-method used in a batch script to read the first line of a text file not working in the body of a “for”-loop?

I tried to apply the answer given by Spaceballs to this question within the body of a for-loop. example.bat: @echo off copy NUL %1 echo firstLine >> %1 echo /=======================/ for /l ...
0
votes
1answer
39 views

Batch convert flv to mkv with mkvmerge

I have a bunch of *.flv videos in a folder on my Windows computer that I would like to convert (or remux) to *.mkv. Since I have a lot of files I would like to automate this process with a batch ...
2
votes
0answers
39 views

How to get the PID of the windows cmd I'm in

I want to create a unique directory for the time a process runs (to complete the copy process I described in this question). I've tried %random% but it changes too slowly. Waiting is not a viable ...
0
votes
4answers
92 views

Executing a powershell script through batch file

I am trying to execute a powershell script through a batch file, at the moment I am only testing this to get it running so the .ps1 file is simply a hello world script. This ALMOST works fine except ...
3
votes
1answer
46 views

Drive letter of given file in windows batch

I'm writing a script where I will get a file name as a parameter. The file will be absolute. (Ideally the solution would support relative files as well, but I can live with absolute-only). It is ...
0
votes
0answers
19 views

How to create new folder based on the copied text

it's my first question here on the website. i'm asking about create new folder based on the current copied text. in my work, i'm creating like 100 folder per hour for each file, and each folder must ...
0
votes
0answers
7 views

iMac 10.9.5 directory file names

I have a directory which contains files and folders. The folders contain a single pdf file. Each pdf file is named according to the following convention: DDDDD-LLL-LLLL-L-DDD - [random phrase of ...
0
votes
1answer
24 views

How to escape quotes in arg passed to program

So I have following problem. I have batch script script.bat having folowing content cat %* | gawk " { value = "something" } " Which obviously does not work. In bash, I would escape the quotes ...
0
votes
0answers
16 views

Batch - Schtasks Onstart Repeat Interval

Command I'm using: SCHTASKS /Create /SC ONSTART /TN "TaskName" /TR "path" /RU "user" /RP "pass" /RL HIGHEST I'd like to repeat this task every 10 minutes, which would be doable with the /RI flag, ...
0
votes
1answer
21 views

Marking / flagging files in a way that is visible to a windows batch file

I would like to construct an automated procedure for transferring files from my Windows desktop to a remote storage for backup. I envisage the automation being done by a Windows batch file. To ...
0
votes
1answer
25 views

Using WIndows 7 SR1

I work in a company that does net support for 20 different schools. While working on accounts I might log my "test" computer in 10 different domains in one day. After a few days a login goes from ...
1
vote
1answer
38 views

Disable/enable lan-device by batchfile: If comparisons not working

I have created this .bat-file which is invoked by clicking on the proper shortcut, which is configured properly. But the last two comparisons seem not to evaluate properly. Here we go. @ECHO off ...
1
vote
1answer
68 views

Create Bat File With Excel Data with VBA

I took some research from google Sub ExportRangetoFile() Dim wb As Workbook Dim saveFile As String Dim WorkRng As Range Set WorkRng = Sheets("Match").Range("K:K") ...
1
vote
0answers
52 views

MSInfo32 command line switches and Windows 10 issue checking remote PC

I am trying to run MSInfo32 on a list of hostnames using the command line switches: for /F "tokens=*" %%A in (hosts.txt) do ( start /wait msinfo32 /nfo %%A /computer %%A ) It appears to work ...
3
votes
2answers
59 views

How to execute a program using wildcards in the path

I try to launch an .exe file in a very simple batch script. The problem I'm faced in is that I don't know the name of the target folder where the program is located cause it's suffixed by the ...
0
votes
0answers
31 views

How to run a task when a event is registered? (Windows XP)

Perhaps my question has already been answered, but I need my script run after Windows register any WiFi connection event. (The bat script reconnect a mapped drive only after there is a wifi ...
2
votes
1answer
48 views

How to quickly copy *specific multiple* files?

Say I have a list of filenames like these, file01.001 file02.abc fiAl.12x ect. All with full extensions. They are all in the main folder C:\ABC. Some files will be in subfolders or even in ...
1
vote
0answers
30 views

Notepad++ custom language how to only highlight if comment keyword has a space

In the custom language editor in Notepad++, I recreated the batch language syntax highlighting, as I saw it as poorly made. My issue is that in making a remark with rem, I cannot have words like ...
0
votes
1answer
52 views

Is there any way to add an HTTP Header to every IE request on a computer?

I would like to add a custom HTTP Header to every Internet Explorer request on a computer (or every browser request). I don't know if this is possible whatsoever, if you have heard of anyway to ...
1
vote
0answers
27 views

Can I prevent the change of overlay icons?

Background Several programs modifiy the icons in explorere to indicate a state ("synched" etc.) It is a known fact, that Windows (win7, win8, win10?) can only handle a limited amount of such icons ...
1
vote
1answer
46 views

How to set one password for all net users in cmd for batch script?

Im writing a windows batch script and I need to set all the users to a certain password? I know that I can do net user to see all users on the computer and I can do net user username password to set ...
1
vote
0answers
28 views

Bat script's remote path not working with “SET Profiles=\\%PC%\C$\Users”

@ECHO OFF :ProfilDeleter SET /P PC=Enter Remote Ip/HostName (for Exit press M): if [%PC%]==[] cls && @echo you should fill && goto ProfilDeleter if %PC%==m goto :Menu if %PC%==M goto ...
4
votes
1answer
64 views

How do I escape a certain character in a variable in a batch file

I made this script but it doesn't work : for /R %%f in (*.mkv) do ( ffmpeg -i "%%f" -vf subtitles="%%~nf.mkv" -acodec copy "%%~nf.mp4" ) PAUSE After looking for the problem, I found that the ...
0
votes
1answer
88 views

A task inside my windows task scheduler will cause my server to stop responding

I have the following AppPoolActivation.ps1 file, to call a URL :- [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $request = ...
0
votes
2answers
58 views

save username and password in batch file to log into putty is recommended?

Is it safe and secure to save username and password in a batch file and use it to connect to putty ? Batch file contains below command: start putty -ssh -load session -l username -pw password
0
votes
1answer
41 views

Command line (Windows) to update same xml file with trim

Currently I am using a curl command to grab data output to a text file and trim top 14 line away, convert the file to abc.xml @echo off call :sub >output.txt exit /b :sub c:\curl -X GET ...
1
vote
1answer
46 views

MSDOS 4.0 string manipulation?

Due to very old hardware I'm forced to run Windows 3.1 that controls the plotter. The software I'm using creates a .bat file with this line in it: SPLOT.EXE/fmyfile.uc c:\myfile.plt the /f - is a ...
0
votes
1answer
28 views

Rename folder on remote server

I am calling a .bat file which contains the following command net use \\128.545.k.k\E_Drive /user:Username psw to connect to a remote server. I would like to rename a folder on the remote server i ...
1
vote
1answer
83 views

Local group policy for all users

Windows 7, 64bit. I have two simple .bat scripts created, one which runs at logon, the other at logoff. The .bat files are located in C:\bat. Other users have access to this folder. The contents of ...
1
vote
1answer
33 views

Disable com port until login

Using Windows 7 (64bit). I have an RFID Pad connected to my PC via USB. My issue is that whenever the RFID pad is connected and I start the PC, I get a blue screen of death just after the 'Starting ...
0
votes
2answers
43 views

RDP logout using bat file

Using Windows 7. When I RDP to a PC I'd like to be able to logout of the session without the screen reverting to a Ctrl+Alt+Del Login screen. The PC's in question are kiosks running Chrome in full ...
0
votes
1answer
51 views

Using for and if commands for a list of strings in a batch file

I am making a batch file for windows. I have just started learning batch scripting and I have some problems here. @echo off set langList=("eng","fre","chi") :Get_ISOlanguage set "ISOlanguage=" set ...
3
votes
3answers
214 views

Batch command how to make a list for set /p

I am trying to make a batch script that asks for user input. The user input should be limited to certain words. If the user enters any other words than e.g. (eng, ger, fra) the user will get an echo ...
0
votes
1answer
25 views

Run several processes in cmd window with ConEmu

I'm using ConEmu with Windows 8.1. I need to write a BAT-file, which will run ConEmu and open several cmd-shell tabs, running a process in each of it. Right now my file looks like this: start ...
0
votes
2answers
37 views

Copying and renaming of .xlsm files using batch

Its glad to be here and i am really excited n new to batch scripting. I have been using a batch containing below for copying an excel from one folder to another { @echo off cp -r ...
3
votes
2answers
119 views

How can I tell if my batch file is running?

I have a batch script which is run from an AT command, and may get run more than once. When it starts, I need it to detect if it already running, and if so, exit (the second one) immediately. It ...
1
vote
4answers
91 views

Batch file to run programs as admin - error 740

I am working on a small batch script that elevates basic windows programs to run as administrator. All of the functions work fine but I have ran into a problem when trying to run "regedit.exe". When ...
1
vote
1answer
92 views

can you start a program at windows startup using bat file and send it file path

can a bat file or vbs file take an argument (a path to an exe file) then create a shortcut to that file and place in the startup folder or add a registry entry to run that exe at windows startup but ...
0
votes
0answers
29 views

Autorun a bat file after a predefined inactive period

Is there a way to auto run the following command after a predefined inactive time? manage-bde -lock G: This DOS command activates the bit lock on windows on a removable G drive. I want preferably ...
1
vote
1answer
43 views

Run Atom using a bat file after changing directory

I have writen in my bat file cmd /k cd /d"C:\Users\amanz\Desktop\Introduction - Computing\Java files" call atomer.bat right now, it just seems to change the directory and stops right there. It ...
2
votes
1answer
61 views

Batch command delete from list of files from multiple computers

Currently I use a poor piece of programming where I delete multiple files on multiple PC's. What I would like to do is have a file with the names of the PC's (PC.txt) and a file (filedel.txt) with ...
0
votes
1answer
22 views

Batch file to detect when a device connects to hosted wireless hotspot on a laptop

I have created a wireless hotspot on my laptop using: netsh wlan start hostednetwork This works perfectly. I have a raspberry pi that automatically connects to this network automatically, however ...
0
votes
1answer
22 views

Open an executable with a parameter?

I'm trying to open putty with my server data loaded through a batch file. I tried start "OVH" "C:\Program Files (x86)\PuTTY\putty.exe -ssh username@ip.address -pw password", and that did not work; ...
3
votes
1answer
129 views

Batch file FOR loop to copy folders only if they exist in another folder

I'm trying to write a batch file that copies folders from one folder location to another, but only if they exist in a third folder. That sounds confusing, I'll try again. I have the following 3 ...
1
vote
1answer
48 views

Bat file doesn't log when running from task scheduler?

I made a bat file which restarts 2 services, and I have it run in task scheduler. If I run the bat file normally, I can see it logging in current directory as the bat file. But if I run it through ...
1
vote
1answer
23 views

Multiple line Windows Batch File issue

I have a batch file with following contents Line 1 "C:\Program Files (x86)\Dell\SysMgt\bmc\ipmish.exe" -interactive -ip 192.168.1.5 -u root -p Password after this it goes to prompt IPMISH> Line 2 ...
0
votes
0answers
25 views

Write on screen directly on top of everything

Is there any way to make some huge text appear on screen on top of everything? something as shown below. I know I can use Rainmeter but i need something that can be used in batch files.