Questions tagged [batch]

A batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter under MS-DOS and Microsoft Windows.

This was the first extension used by Microsoft for batch files. This extension runs with MS-DOS and all versions of Windows, under COMMAND.COM or cmd.exe, which execute its commands, normally line-by-line.

339 questions
0
votes
2 answers

.bat file question

I'm working on Windows XP. I need the batch file to do the following: Create a directory $DOMAINNAME on D:/Webserver/domains/%DOMAINNAME/www/ Open the file - D:/Webserver/apache2/conf/extra/httpd-vhosts.conf Append the following to that…
Kirill Firsov
  • 75
  • 1
  • 5
0
votes
2 answers

Batch command to schedule multiple servers to shutdown

Our company is in the middle of a move between buildings. I've been asked to schedule the majority of our servers to shutdown at midday tomorrow. They already have a scheduled task for this, which occurred in the past, and occurred once only. I…
Steve
  • 365
  • 2
  • 7
  • 18
0
votes
1 answer

purging files using forfiles in a batch and running that batch from a task

I have the following in a batch file that works perfectly fine if I execute it manually but fails when I tell the task scheduler to run it. forfiles -s -m *.bak -d -4 -c "cmd /c del @path" This batch file deletes any BAK files in the same directory…
TWood
  • 295
  • 7
  • 20
0
votes
1 answer

How to create a windows user from the command line, using a password from a file

Im in a somewhat unique situation. I am trying to create a windows user, using the command line or a batch file. I know how to do that in the basic case: net user username password /add The problem is that i am doing this through an endpoint…
0
votes
1 answer

Help for batch file

I have to create a Windows XP batch file to copy files from a series of computers into a directory on another machine. I've a text file with our internal LAN IPs like this: 171.10.2.2 171.10.3.2 etc. I have to copy all files from :…
stighy
  • 931
  • 8
  • 21
  • 32
0
votes
2 answers

Edit local user account remotely: set passwordreq:yes

I'm using Net user username /passwordreq:yes but I need to do this on a bunch of machines. I can run a batch through SCCM, but would like to do it with a script. Anyone have a way to do this? Thanks! -Mathew
MathewC
  • 6,957
  • 9
  • 39
  • 53
0
votes
2 answers

Batch File help needed for PsList/PsKill when a process is over a specific age (elapsed time)

I'd like to request some help in creating a Batch file to run on a windows server which will monitor processes which sometimes get "stuck" and linger after they should be killed. Specifcally, I can see the "age" of a process in the Elapsed Time…
zeroasterisk
  • 275
  • 1
  • 4
  • 10
0
votes
2 answers

Cron jobs in cascade array

If anyone it's like me and work even once with IBM Mainframe batch jobs, then it's possible that you know CONTROL-M, that is a tool to schedule jobs not only in a date and time fashion but also in terms of conditionals base on success or failures of…
denica001
0
votes
0 answers

AWStats a network drive

I am running AWStats from a NAS networked drive on a Windows network. The apache sever log files are also on the NAS network drive and the path includes the network drive letter along with locations for the log files and AWStats. I am running…
Leora
  • 1
  • 1
0
votes
1 answer

Delete selected subkeys in a registry key

I need to Delete selected subkeys in a registry key. For one of the subkeys I need to delete I tried: (SET _KEY=SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC) REG Delete "HKCU\%_KEY%" /V "C:\ProgramData\Microsoft\Windows\Start …
Docfxit
  • 11
  • 4
0
votes
1 answer

How can I redirect the output of one command in a batch file?

Edit: This question has been answered, please scroll down ⬇️ This question is related to Server Fault because I am automating minifying some web files before deploying them to my server. So I have a batchfile which calls minify like this: minify…
0
votes
1 answer

Using GPO to run batch files at logon not working

I'm having a weird issue with creating Group Policy on an inherited Domain Controller. This thing was never set up properly, and I'm not well versed in working with Group Policy. We are running Active Directory 10.0.14393.2608 on a single Domain…
GW_IT
  • 11
  • 1
  • 2
0
votes
1 answer

What is the best AWS infrastructure to run a migration of data from one SQL server to mongoDB?

I have some terabytes of data in our legacy system which runs SQL server. Our newer version runs on MongoDB. We are migrating this data to MongoDB. We have python scripts written and verfied, all data movement happens properly. we did this on a…
J Bourne
  • 101
  • 3
0
votes
1 answer

How to reset the "allow pc to be discoverable on this network" prompt?

I have been advised to ask this question here on ServerFault. I've searched StackExchange, StackOverflow, and Google and I'm not finding any insights on how to reset the prompt when first connecting a PC to the internet. I've found oodles of…
k1dfr0std
  • 101
0
votes
0 answers

at-command: Scheduling and process priority

I have about 10 "at" jobs. There are cases where there is a conflict of resources and I am trying to find a neat way to schedule this. Say, job#5 may want to start before the job#4 ends. Each job has a priority/weight. If job#5 has higher priority,…
SEU
  • 101