Questions tagged [batch-file]

batch files are simple text files executed in a command to achieve a particular task or a set of tasks

batch files are text files containing commands executed in sequence to achieve a particular task or a set of tasks. They can be very simple, or can contain complex logic.

440 questions
0
votes
1 answer

Windows batch file to start and stop service for different users

I am having an Admin account that wanted to run a batch file that will start and stop a few services for different users.(Wanted to perform from the same server) For example, what I wanted to do is CMD run as username password net start…
0
votes
0 answers

How to automate a task on a server and upload output to an FTP server?

I have a process that works in the following way: downloading data from the internet. executing a program → creating output A. output A → executing a program → creating output B output B → executing another program → creating output C output C →…
0
votes
1 answer

How to build a bat file or a VBS file in windows server that call external URL and save the result inside a variable?

This is what I like to achieve inside Window Server: Call external URL: https://www.example.com Save the result of that URL in a variable. If the variable is XXX kill a process inside the Window Server. What is the best way to manage it inside…
Noamway
  • 153
  • 2
  • 8
0
votes
2 answers

Replace empty spaces with a zeros in file name

Not a coder but know the logic like understanding a language but not able to speak it. Environment is Windows server 2016. Trying to write a .bat file to replace empty spaces with zeros '0' in a file name in a directory. Found a script online and…
user590590
  • 11
  • 1
0
votes
1 answer

Get the previous day date as variable in batch file from powershell command output

The scenario is like this. I need a previous day date (i.e. Today -1) as variable in a batch file. But if previous day is Sunday (i.e. script running on Monday) it should return the Saturday's date (i.e. Today -2). I have tried the below script but…
0
votes
0 answers

Windows Update killed server reboot batch job. Is there a replacement?

I have been creating a scheduled task with powershell to use a group managed service account (the only kind allowed) on Window Server 2016. Did this approximately one year ago on 5 2016 VM's, and it's worked flawlessly, with each one set to reboot…
-1
votes
2 answers

How to create a batch file which after some time execute a file but if interrupted execute another?

I want to automate my ms office installation 2007 or 2010 running a batch file. I am thinking having an options menu 1.Office 2007 2.Office2010 When started I want my timer to start..lets say 20secs if I press in the meantime Option 2 start…
-1
votes
1 answer

Scheduled tasks

Overview:- I need to download a csv file every 10 mins from an intranet site. This is done using a batch file. To ensure that it happens with out any delay, i have set up multiple tasks using Windows tasks scheduler. The tasks runs successfully…
-1
votes
1 answer

Execute bat file via php on a local network to run on any PC connected

I have a web app which runs on a local server (XAMPP)...its on a computer (PC1) which serve as a server..other computers are connected to the same wireless network and can run the web app also from the network. Problem now is, i have a code that…
-1
votes
2 answers

Search for file names containing space

I have a batch file that helps me in install multiple pieces of software from a shared folder. It's working well with software whose names don't contain spaces, but I need it to work with software does. this code is working fine because thereis no…
-1
votes
1 answer

Best Practices for User folder permissions

The following is my bat file. Is there a way I can substitute First.Last with usernames from a CSV file? My boss doesn't want to do all the users at once. He's afraid that something may happen so he's handpicking 10-20 people every night. echo Y |…
-1
votes
2 answers

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility does not have an option to use currently logged in…
-1
votes
2 answers

Command only working when put directly in command prompt, not in batch file

On my SBS 2011 I have a batch file called wakeup-nas.bat, with the following contents: wol.exe 5475e0d59ffa wol.exe is an executable for sending wake on lan packets. It is in the same directory as the batch file. Strangely the command is only…
-1
votes
1 answer

Unattended Uninstall of IIS 7.0

I know there are scripts available on the Microsoft website to have an unattended installation of IIS, but I was wondering if there is anyone who can help me out with a script to have an unattended uninstall of IIS? Thank you!!
-2
votes
1 answer

create a .bat to map users to a shared folder but it maps them to their desired folder inside by username

I created a shared folder on my NAS box that has a folder for each user in it and it mimics their user name. I'm looking to write a .bat that will map the user folders inside to each user by user name. So when they log in they have their folder in…
1 2 3
29
30