Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

0
votes
1answer
20 views

Copying content from one directory to another

I'm copying a lot of folders/subdirectories from one network drive to another, however, the names of these files aren't known and I only want to copy the contents of the folders that have a name ...
-2
votes
0answers
17 views

bat file to find image dimension and set into image tag [on hold]

bat file code to find dimension (width and height) of multiple images that located in image folder and set that dimension in image tag in html pages according their image name. i am try using this ...
0
votes
0answers
26 views

command doesn't stop when finds a hit? [on hold]

I use ncrack and this is the code I use inside a bat file and this are all my 6 pass lists: Ncrack running 1 pass then 2'nd pass then 3'rd pass etc....but.. ncrack --user Admin -P pass1.txt ...
1
vote
0answers
20 views

Mkvmerge batch for change default audio

I want to change the default audio of my files but there are too many. How can I do it with cmd or bat file? This is my code for one file: "C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language ...
1
vote
2answers
28 views

How to hide commands in the prompt of Windows 10 from a batch file?

I want to hide the commands in the prompt that opened from a batch file. Example: This is how it normally is: This is how I want it to be: It would be good as well if there was a way of output ...
1
vote
0answers
30 views

0x1 issue in windows task scheduler

I am running a bat file which will delete the files or folders older than 14 days from the today's date , when i am testing it in local folders it is executing fine, but when i am trying to delete the ...
2
votes
1answer
22 views

Windows batch: Get the first folder name starting with some value?

I have a batch file in which I pass the name of the folder I want to use as a argument. But now I want to make it a little smarter by letting the user specify only the first few characters of the name ...
0
votes
0answers
22 views

batch programming net use redundancy

I am trying to add some redundancy to a mapped shared folder. my .bat file contains the following: net use * /delete /yes net use * \\xxx.xxx.x.1\shared folder /user:user pass /persistent:yes /y ...
1
vote
1answer
25 views

Bat script for a set of csv files in a folder

How to store a value in a variable and load that variable as a new column in a file using a batch script? The above link is used to read a date field and write it to all the records in a csv file. I ...
1
vote
1answer
25 views

How to store a value in a variable and load that variable as a new column in a file using a batch script?

I want to read a csv file and store a value in a variable and use that variable value to be written as a last column of the same file. @echo off del three.txt setlocal ENABLEDELAYEDEXPANSION set ...
1
vote
1answer
28 views

CMD or BAT to copy/replace files from a relative path to a .lnk target location

Example : I will have the following : Folder that contains : The CMD or BAT file the file/files needed to be copied ( Ex: file1.exe and file2.exe ) A .lnk located at the desktop ( Ex: ...
-1
votes
1answer
28 views

Getting a script to run using file length on Windows 7?

I need a script to run whenever a file is to long (rename the file. Say a rcv file is put into a folder and it is named 123456789.rcv. But the program we use to grab this will not take it because ...
1
vote
1answer
45 views

Windows batch script for multiple files

I have multiple ascii files like Total-0100.dat and want to batch process using an executable in another directory. In short, I have multiple files with incremnet of 100 or 1000 e.g. ...
0
votes
0answers
14 views

How can I use the directory path of a batch file WITHIN that same batch file? [duplicate]

I want to use a batch file to create directories and copy other batch files to those directories. This is to automatically 'install' different batch programs by copying them to 'program files', ...
1
vote
1answer
26 views

Entering a 2 word answer causes batch file to crash. How can I avoid this?

I am just writing a silly little program, but the problem I'm having seems quite generic. Here is the part of the code that is causing me problems: Warning: the code opens a google search. set /a ...
1
vote
1answer
31 views

Permanently setting PATH from CMD windows 8

I'm setting up a custom command line utility, and the 'installer' adds a PATH entry. It works after this for the current session. After I close and open the command prompt, the PATH is reset and the ...
0
votes
1answer
51 views

Batch file doesn't execute WinSCP script completely

I am working on a bat file wherein I have to login to a remove server through SFTP with WinSCP and execute a shell script and get a file to system from the remote server. Below is the code. cd ...
0
votes
0answers
18 views

Windows Batchfile

I m looking for a batch code that does the following Job: Delete line 35 to 39 & 43 to 138. The result should stored(Modified) in the same file. I found one such Code by googling. ...
0
votes
0answers
23 views

How can I know that I have reached end of the file(EOF) using batch scripting

I am working on batch scripting. I am struck at the of point of comparing my variable with EOF (end of the file). set "file=abc.csv" for /F "usebackq delims=" %%a in ("%file%") do ( if ...
1
vote
1answer
16 views

Parse an output of a command to disconnect a remote desktop session

qwinsta administrator | findstr Administrator Gives output as >rdp-tcp#26 Administrator 2 Active I need to get only the SESSIONNAME i.e. "rdp-tcp#26" and use in next ...
-2
votes
1answer
50 views

cmd: Find first letter from a string

I've no knowledge regarding cmd programming syntax. I have a text file containing user IDs which I need to delete using curl command and for that I need to extract first character of every user ID and ...
1
vote
2answers
26 views

can't run console program in batch file

I have a batch file (run.bat) which is to change my IP address setting: netsh interface ip set address "lan" static 192.168.30.77 255.255.255.0 192.168.30.2 The command worked as I expected when I ...
1
vote
1answer
47 views

Batch file append slash to the beginning to string variable

I have a variable containing a path like this a\b\c And I want to turn it into something like /a\b\c I tried like this set SLASH=/ set HOME_MF=%SLASH%%HOME:\=/% and a number of other ways, ...
0
votes
2answers
27 views

Have .bat ask for further input

If I end a line in cmd with ^, it will ask for more input. D:\some\folders>do ^ More? stuff Let's say I don't want to enter do every time I wanna do stuff so I put it in a .bat, and let's say ...
0
votes
0answers
42 views

using youtube-dl.exe for downloading continious videos

I am using youtube-dl.exe for downloading playlist but after some time it automatically stops and doesnt automatically resume the download and after network connectivity changes does the same below is ...
1
vote
2answers
26 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
0
votes
1answer
73 views

How do I restore .bat association on Windows 8? [duplicate]

I have accidentally set the association for .bat files to notepad. This was done by going to the Default Programs panel and setting it to run with notepad. I've tried everything I can find on this ...
0
votes
1answer
24 views

“Element not found” error when adding dns via netsh command

When trying to add dns entries via netsh commands, I get "Element not found" errors. netsh interface ip set dns “Wi-FI” static 10.0.0.1 1 What is the correct command format for setting both primary ...
2
votes
2answers
42 views

does start title and tasklist /fi windowtitle reference the same title?

I was looking up the start and tasklist commands, and i noticed 2 things. They both had references to a window title. start "myTest" /b somefile argA tasklist /fi "WindowTitle eq myTest" the thing ...
2
votes
1answer
42 views

NirCmd Screen stays black after waking up from sleep mode

I have a computer that should have 0 user interactions. I want it to turn off and on on specific times. Right now, i have a command that puts the computer to sleep. However i also need a task that ...
0
votes
0answers
86 views

Batch File to Set Default Programs Without Invoking the Registry

Our organization has the Chrome policy enabled for setting Chrome as the default browser. This setting is mandatory, and cannot be disabled like many of the other policies we have that are ...
8
votes
1answer
951 views

Batch file opens Default Browser instead of Firefox

I have a login script that runs for every user. The first check sees if the username matches our Test-Taking User (exam). If so, launches Firefox to the exam homepage and stops. The commands ...
16
votes
2answers
409 views

CMD window will not close if folder is closed during execution of bat file

I have a Server 2012 R2 Standard 64 Bit virtual machine that is acting strangely. Bat files work fine and the CMD window closes normally; but if the folder containing the bat file is closed during ...
1
vote
0answers
61 views

Replace / Edit host file with windows BAT

I wish to add and remove some lines in host file within a period of time (Time setting will be done via task schedule job) I can create two BAT file, one for adding new lines and one for removing ...
0
votes
0answers
20 views

Batch File Move command to non existent folder

I accidentally executed a move from a file to a folder that doesn't exist. How can I restore my file? It is listed with correct file size but without an extension.
0
votes
2answers
43 views

How to run multiple batch files with one master batch file

I have three bat files I would like to run, in three different directories: directory/bat1/bat1.bat directory/bat2/bat2.bat directory/bat3/bat3.bat I would like to use one master .bat to start all ...
0
votes
0answers
27 views

How to .bat launch a vnc session in windows?

I have a specific vnc session I want to start up: myhost: 5000 Password: *()BS^Y9hub)GS*^&Dt I am using the standalone VNCViewer-5.x.x.exe file right now to start it. vncviewer command does not ...
-1
votes
1answer
37 views

How do I get windows version as a variable?

I'm making some batch files to personalise my windows installations faster, but I need my batch to take a road depending on which Windows version it's running on. If i could get the windows version ...
2
votes
1answer
78 views

Need a batchfile to run on startup/shutdown, logon/logoff & lock/unlock for a Windows 10 machine

I'm not yet a programmer but looking for a solution that is not made yet seems fun. I do have some questions about the solution I look for. Situation: I have a keyboard that needs an application to ...
0
votes
1answer
29 views

CMD Command Copy and paste

I want to make a .CMD/.BAT program that copies a cmd command like: title Ipconfig Copy ipconfig /all ... This program is not completed because I want to copy all information and addresses of ...
0
votes
1answer
21 views

why after subtraction is an extra space generated in a batch script?

I am trying to copy my dbf file into a backup folder every Monday. If the Monday is not greater then 7 then it will copy previous month file. When I subtract 1 from the month it adds an extra space. ...
2
votes
2answers
34 views

Nesting IF in Windows Bat file

I am having some difficulty in understanding how the Nested IF works in windows .bat script. What I wish to achieve is as follows. I shall be passing two parameters to a bat file IF first parameter = ...
1
vote
0answers
31 views

How can I reproduce linux's `column -t` command equivalent in windows?

What is the equivalent command for Linux's column command in windows? How can I reproduce column -t in windows? I cant find anything related on windows batch file commands list. any help is greatly ...
0
votes
1answer
63 views

Parsing a string variable in a batch file for LAPS / ADU&C

I am trying to implement LAPS (Local Admin Password Solution) on our network and I am having issues integrating LAPS with the ADU&C right-click context menu. My goal is for our Helpdesk staff to ...
0
votes
0answers
36 views

Run a batch as domain admin during logon of user using GPO

I am creating an installer command. I have it fine tuned and working well. There is one catch, needing admin privileges to do some folder copies. I'd like to run my batch file as administrator ...
1
vote
1answer
58 views

Using runas to execute a minimized application

How can I run an application as another user and have that application's window minimized. Unfortunately, that application has no preference setting to have it start minimized. runas /savecred ...
1
vote
1answer
23 views

Batch script to create folder with first 2 characters in which to create config ini files

I have the following code in my batch, which I want to read the lines in test.txt, create a folder with the first 2 Characters and make config ini files for the respective items in their intented ...
3
votes
3answers
89 views

How to detect DVD drive letter via BATCH file in MS WIndows 7?

How to detect DVD drive letter via BATCH file in MS WIndows 7? I mean, I need to know that DVD could have assigned letter D or E... Is there any script to do it?
0
votes
1answer
46 views

How to output net group command in list format in batch

I'm using the net group "Groupname" /domain command which outputs a bunch of users in the group in the format of 3 columns. There are spaces between the columns. How do I output the command so that ...
0
votes
1answer
34 views

Issues with batch file to upload to FTP

I have currently created a .bat file to run a ftp command to upload documents to different locations. I need to have a lag time to ensure a response is received confirming data was posted successfully ...