Browsing articles tagged with "batchfile - Admins Goodies"
Jan 8, 2013
tom

RoboCopy A File From The Web?

Is it possible to download a file from the web using RoboCopy? What would the syntax for that be? Here’s what I’m trying: RoboCopy “http://www.google.com/” “C:\some_folder\” “index.html” /L /V /E /LOG:”C:\some_folder\test_robocopy.log” /R:10 /W:30 The error log is giving me an error that seems to indicate the file is a folder, and also that it’s trying to hit http://www.google.com as a folder on my location machine. ——————————————————————————- ROBOCOPY :: Robust File Copy for Windows ——————————————————————————- Started […]

Continue Reading »
Jul 29, 2012
tom

Backup with Mercurial and Robocopy?

The Problem We would like to backup our critical files from several network shares to a removable hard drive. We want to automate the backup so we don’t have to remember to run it. It needs to finish overnight. Furthermore, we want to be able to preserve multiple versions of each file so we can back out of our user’s mistakes easier. Background Information I work in a large Windows-based enterprise with a centralized IT […]

Continue Reading »
May 17, 2012
tom

Running a batch script as network services on windows

On linux I know you can run files under different users pretty easily but on Windows how do you do it? Do I have to log in under that user? Can I run it with the schedule system? I need to be able to run a batch type file under another user. Asked by Tiffany Walker Yes, you can select the target user when setting up a job in the Task Scheduler. It’s in the […]

Continue Reading »
May 11, 2012
tom

Amazon S3 – Automated Backup Using S3Sync, Windows Schedule & BAT file

I am trying to build an automated background backup program to backup my entire website and its heavy photo folders, using Amazon’s cloud storage service, S3. I am using S3Sync from S3Tools and have successfully tested a dummy backup using only the command line window. When I save the working command line to a batch file (.BAT) and have a Windows schedule call it, it does not work. I can only think this has something […]

Continue Reading »
May 9, 2012
tom

Script to delete Shortcut on each user’s desktop

I’m looking for a script to remove a .lnk file that was placed on every user’s desktop. I installed a program on a terminal server that put a .lnk file on every user’s desktop, rather than putting one shortcut in the “Public” desktop folder. I have since removed the program, but now I need a script to remove the shortcut from each user’s desktop. Any help is much appreciated, thanks! Asked by user1236435 why a […]

Continue Reading »
Apr 25, 2012
tom

Running Linux Script from Windows in backgound

I’m using following script from my windows machine to run on linux and do backup. @ECHO off :: run remote command plink.exe username@myserver /home/username/do-backup.sh Problem with this script is that, i have to keep my session live. as backup takes 30 minutes or so , so I want to know if there is any way I run this script and after that backup command keeps working even if i turn off my system. or you […]

Continue Reading »
Apr 3, 2012
tom

batch file infinite loop when parsing file

EDIT: Apparently I don’t have enough rep to answer my own question, so the answer is going here. OKAY! SO! I didn’t exactly solve the problem… but I stopped using cacls.exe and started using icacls.exe and now it seems to work again. The batch file now looks like this: FOR /F “tokens=*” %%A IN (dirlist.txt) DO echo y| icacls “%%A” /T /C /Grant “Domain Admins”:f “Some Group”:f “some-security-group”:f Apparently, cacls is depreciated in 2k8 and […]

Continue Reading »
Mar 29, 2012
tom

Move directory in DOS (batch file) without knowing full directory name

In Bash I can move a directory without know the full directory name like so: mv gradle-*/ gradle/ How do I do this in cmd (i.e. batch file, not powershell). The move command doesn’t seem to allow this. Asked by vicjugador MOVE only moves 1 dir to another location and therefore doesn’t bother expanding wildcards. Unlike Unix where the shell expands wildcards on Windows each command has to do it by itself which leads to […]

Continue Reading »
Mar 14, 2012
tom

How to set the Backup Identification Label of a job in NT backup using the command line

I’m using NTBackup on a server 2003 R2 system, to backup to a file over the network, using a batch script. What I’m trying to do is to change the name of the backup set as displayed in NTBackup’s ‘Restore and Manage Media’ tab (highlighted below), as the list will become unmanageable when it gets larger. I want to use the format YYYY-MM-DD <name> to sort the list in a usable manner. Is this possible? […]

Continue Reading »
Feb 29, 2012
tom

Nmap / Batch: alert if only ports usually closed are opened?

Context I check open ports on my server with a scheduled batch file: nmap.exe server1 server2 server3 etc >> log.txt Usually 21, 22, 80, 443 and 3389 are opened. Now I want to send an email if only other ports are opened. I saw there is Nmap Script Engine but I didn’t find examples to understand… Also I would like to use batch if possible because I have already developed email mailings with this language […]

Continue Reading »
Pages:1234567...14»