Script files that are executed by the Windows command-line interpreter.
0
votes
2answers
17 views
how to clear a variable which is set from command line by “set /a var1=”
In ms dos bat files, I accept variable from user input by set /p var1=, after var1 is used, I don't know how to reset/clear its value.
If I don't reset/clear its value, when user meets set /p var1= ...
2
votes
1answer
32 views
Loop through code batch file
I have done a batch file to help me doing a measurement but I don't know how to put it in a for-loop to make it for n times and to change the name of the folder in "Results" as it changes in the for ...
1
vote
1answer
14 views
Unable to display the value of environment variable
The code is as below
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
cd/
if exist c:\programdata\intel\pre (
if exist c:\Locker (
move c:\Locker c:\programdata\intel
rename ...
0
votes
1answer
44 views
Extracting IP from ping into variable in bat script
is there anyway i could do this?
@echo off
REM #Testing FIND in IPCONFIG
setlocal EnableDelayedExpansion
for /f "tokens=3" %%a in ('ping localhost ^| findstr /i "reply"') do (
set address=%%a
...
-3
votes
2answers
19 views
Need batch file to create folder every 24 hours
I'm using Windows 7. I want folder has to be created every 24 hours automatically. I have done some basic research on this but I couldn't get the batch file. Please help on this. Thanks in advance.
0
votes
2answers
20 views
Reading Lines in Batch File - How To Read Paired Distant Lines
I am trying to making a batch file to store the account names and passwords of thousands of accounts in 32 block intervals. It will do something different in the first account of every 32 accounts. ...
0
votes
1answer
12 views
Calculating A Percentage Of System Ram With Batch Script (Using In Dynamic Memory Management Modification)
So I think I have this correct but for some reason it's not reading from the output file "ram.dat". Can anyone find the error in this?
@echo off
set percent=90
:ramcalc
cls
if %percent% GTR 90 Echo ...
1
vote
3answers
46 views
Merge Two text files line by line using batch script
I have 2 text files; A.txt and B.txt and I want to merge them to make C.txt using a batch script.
However (here's the tricky part) I wish to do it so each line from A.txt is appended with a space ...
1
vote
1answer
19 views
How to share files and folders with batch
I want to be able to share a folder on my network via batch file but I don't know how to do this. Net Share comes to mind but i can't seem to get it to work. I need everyone to on my network to be ...
0
votes
2answers
11 views
Registry editing using CMD , Path isn't added
lets start by giving you my code:
@echo off
echo.Add App Shortcut for use with
echo.Windows+R
echo.A.K.A Windows "RUN" Command
echo.===========================
color 0E
echo.Make Sure you do not run ...
0
votes
0answers
21 views
Registry Update via Batch File Issue
So I have created a batch file that is to check certain registry settings for Internet Explorer and set them accordingly. Web history is the primary target. The dilemma is that I can get the batch ...
1
vote
2answers
16 views
batch script - map network drives by computer name
I am trying to modify a current script that is executed as logon script by domain GPO. I have a special case where if users log into a specific machine on the domain, I need to map different network ...
0
votes
0answers
16 views
Task Scheduler randomly not running scripts, reports them as complete
I have a windows server 2008 r2 virtual machine that is set up to run various tasks at night, it reads from a database creating CSVs and copies files to and from locations on other disks. All tasks ...
0
votes
2answers
28 views
Replacing a string in all config files across machines with a script
I have the below task and I am wondering what would be the best and quick way to do this. I am thinking scripting rather than a C# app but struggling with scripting in DOS. I wanted to use powershell ...
1
vote
1answer
8 views
Batch process pdfs to do a Flesch-Kincaid readability test
I have about 1800 PDF files that I have to extract Flesch-Kincaid grade level scores from. Does anyone have any ideas as to how I should best approach this? I need a score per PDF.