Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

-1
votes
0answers
21 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
38 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
13 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
23 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
27 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
28 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
16 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
19 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 <what ...
1
vote
1answer
14 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
44 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
21 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
24 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
24 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
29 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
25 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
62 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
14 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
29 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
34 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
67 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
935 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 ...
-1
votes
0answers
10 views

Manage auditing and security log Remotely

I am tasked to add an account in the "Manage auditing and security log" under User Right Assignment in the Local policies of gpedit. However i have so many workstation without AD, and i need to write ...
16
votes
0answers
302 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
46 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
19 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
35 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
19 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
35 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 ...
-1
votes
0answers
16 views

vba saving as FTP batch file failing when running

When I go to run the following VBA code below it creates a batch file but something is being lost in the saving method as it doesn't recognize the username or the password. I am able to connect to the ...
2
votes
1answer
68 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
27 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
20 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
31 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
29 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
57 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 ...
-1
votes
0answers
23 views

Windows batch script: showing free disk space of mapped drive

I'm really not an expert scripting batch files, so I found following code on the net to display free space of my mapped drive. Drive letter Z: includes 2 hdds from the NAS (Z:\SAMSUNG-HD154UI-01 and ...
0
votes
0answers
29 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
51 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
76 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
31 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
33 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 ...
0
votes
1answer
21 views

Unable to run the batch file for phoronix-test-suite in WindowsXP

I am trying to install phoronix-test-suite in my windows-XP, 64bit. According to the user manual, I only need to run a .bat file from respective directory. When I double click on the .bat file or ...
0
votes
1answer
31 views

How to give “yes” while running an application via batchfile?

I want to run an application via batch file. it asks me to enter yes for 6 times. how I can do that in batch file.
0
votes
0answers
21 views

How to start a server via Jenkins without outputting the server trace in the Jenkins console?

I have written a windows batch script to start an apache tomcat server via Jenkins. When the server starts to run, server trace is shown in the Jenkins console. But all on a sudden the window of the ...
-4
votes
1answer
44 views

Need bat file to randomly move 30 photos from a folder to another

I have a folder "C:\TEST\Clean" with many photos (let's say 436) and I have to move 30 of them to the folder "C:\Dropbox\Apps\AutoPost\For_Post_1". I have this so far but it's for 1 file and I need ...
1
vote
1answer
58 views

Stopping a scheduled task with a batch file action doesn't stop the program running in the batch file

I have several scheduled tasks that each execute a (different) batch file. Each batch file calls into the same program, with with separate command line arguments. If I Stop a task while it's running, ...
1
vote
0answers
84 views

Match lines from a text file (image listing) in SPECIFIED order 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. TASK: Output matched lines from a Log.txt file in same order as ...
0
votes
1answer
58 views

youtube-dl doesn't work with .bat files

I wanna handle my youtube downloading with a .bat file, like so: youtube-dl -o path\%(title)s.%(ext)s --audio-format best -x ^ url and it works just fine in the cmd, but when I put it in a .bat and ...
1
vote
1answer
104 views

Batch command to open url and fulfill username and password

I'm currently opening a local url from batch command (.bat file) like this: @echo off start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE http://some_local_address:88 This is working fine. ...