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

Transfer files without destination access

HI All, I have a issue where I want to create a script (VB or Batch file) that when a user runs the script it will copy files from Folder1 to Folder2. Here's the rub. I don't want the users to have access to Folder2, I need them to run the scipt so…
0
votes
1 answer

Windows Login straight to Terminal Server

Essentially I'm looking for some way via batch (or potentially powershell, but win XP machines so ideally batch) to open up a RDP connection to a LAN based Terminal Server upon a user logging into a machine. Ideally it would involve some (maybe…
PnP
  • 1,684
  • 8
  • 39
  • 65
0
votes
1 answer

Port IE Bookmarks to Chrome

I want to be able to automate the transfer of existing Internet Explorer bookmarks to Google Chrome. We're rolling out Chrome to several users, but we want them to have their old bookmarks from IE automatically. How should I go about this? Thanks…
0
votes
1 answer

Backing up database fully from remote server, and restoring to another remote server

I currently have three copies of my website (Live, Staging, and Development), with the database for each on three separate servers. More often not, a bug will appear that requires an up-to-date database, so I'll RDP into the Live DB, go into SQL…
AlexT
  • 123
  • 4
0
votes
1 answer

.bat file - Nagios v3.2 service check and start if stopped

I'm just barely getting into programming so I do apologize for my ignorance. I'm trying to create a .bat file that will check if a service is running on XP Pro. If service is running it will exit 0. If the service is stopped start service wait 10…
LbakerIT
  • 67
  • 1
  • 8
0
votes
3 answers

read an unknown directories name + copy to it

I would appreciate some help please. I am trying to copy two files "test1.txt" and "test2.txt" into an unknown directory, e.g. into the directory "%USERNAME%\Documents\test\04pql7hw.example" The first section of the directory name is a randomized…
Alex
0
votes
2 answers

Batch File to Loop Through Folders and Process If Specific File Found

I have a large number of websites running the same CMS that I want to update as a batch. As the update process just requires copying the updated files into the folder of the given sites, a batch files seems suitable to the task. Is there a good…
Jason C
  • 3
  • 3
0
votes
1 answer

How to escalate to administrative token in Windows 7 using only CMD.exe

If I am not able to right click on CMD and run as administrator, or CTRL + Shift + Enter to run CMD, but I am using an administrative user account in a non-admin shell (CMD.exe); How in the world do I escalate to an admin from that shell? Runas…
user160910
0
votes
1 answer

Running scheduled task in current profile with another user

I have a doubt about Windows scheduler: I created a domain user (backupuser) appositely to launch a batch file that starts the backup. The problem is that the batch is launched in the "backupuser" profile and it is not shown to the current user. How…
ITAlin
  • 57
  • 8
0
votes
1 answer

Record more events with procmon

'Process Monitor' has a max history depth of 199 million events. I need to record about 10 times this. I don't mind if the data is split, e.g. a new data set for every hour. Anyone know how to do it? I'm guessing a batch file, with backing files…
Sam
  • 159
  • 6
0
votes
1 answer

Enable Recovery console from a batch

I want to enable the Recovery Console on a lot of Windows 2003 servers. I want to automate this so I don't have to manually do it on hundreds of servers. The recovery console install process seems to require human interaction in the form of clicking…
Jake
  • 2,268
  • 5
  • 30
  • 40
0
votes
1 answer

Netsh batch file

Is there way to join win7 to server 2008 by using netsh batch file ? I can change The IP , GateWay , Subnet Mask by bat file but How can I join domain
MIMI
  • 11
  • 1
  • 1
0
votes
1 answer

Windows batch find folder if statement

Assume a file system with the following format Folder A --->Folder 1 --->Folder 2 --->Folder 3 etc.. Folder B --->Folder 4 --->Folder 2 --->Folder 3 Folder C --->Folder 1 --->Folder 2 --->Folder 3 --->Folder 4 I need to go one level deep, and…
0
votes
1 answer

Elevate batch file via UAC

I have found the following routine which is supposed to allow a batch file to issue a UAC prompt and elevate itself to admin. Problem is on Server 2012 it doesn't seem to work for me. According to the notes I have read when a correct admin…
NickC
  • 2,373
  • 13
  • 41
  • 55
0
votes
1 answer

Clearing temp files - Batch file pattern matching for *.tmp also includes *.tmpll

A file match for *.tmp also returns various *.tmpll files, is there anyway to restrict it to *.tmp files only? dir C:\*.tmp /s Also lists a load of *.tmpll files as well. Reason for doing this is to provide a simple way of deleting all windows temp…
NickC
  • 2,373
  • 13
  • 41
  • 55