Wilders Security Forums  

Go Back   Wilders Security Forums > Other Topics > polls
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

View Poll Results: How often do you use batch files to automate tasks?
Quite often; they are highly useful 20 28.57%
Sometimes, when something really boring needs to be done 16 22.86%
Very very rarely or am afraid to try 13 18.57%
Never, I don't know what they are 21 30.00%
Voters: 70. You may not vote on this poll

 
 
Thread Tools Search this Thread
  #1  
Old January 5th, 2007, 06:35 AM
Mrkvonic Mrkvonic is online now
Linux Systems Expert
 
Join Date: May 2005
Posts: 7,433
Default How often do you use batch files to automate tasks?

Hello,
I was wondering how many of you use batch files, combined with scheduling, to perform backups, defragmentation and similar household maintenance duties.
Mrk
__________________
http://www.dedoimedo.com

All your base are belong to us

Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA
  #2  
Old January 5th, 2007, 07:30 AM
Meriadoc's Avatar
Meriadoc Meriadoc is offline
Very Frequent Poster
 
Join Date: Mar 2006
Location: Cymru
Posts: 2,642
Default Re: How often do you use batch files to automate tasks?

Yeah,
best way for me to simplify the management of a computer.
...everything mentioned. Anything to save time with a repetitive task.
shutdown, backup data/networked PCs/directories, cleaning up, renaming, downloading, defrag...any of these with/without a schedule, when I need to customise a program.
__________________
Who controls the past controls the future
Who controls the present controls the past

vmworld
  #3  
Old January 5th, 2007, 07:30 AM
gerardwil gerardwil is offline
Massive Poster
 
Join Date: Jan 2004
Posts: 4,509
Default Re: How often do you use batch files to automate tasks?

Hi Mrk,

Never
Those activities I only carry out when I think it is necessary and does not interrupt my other work.

Gerard
  #4  
Old January 5th, 2007, 08:12 AM
TOMxEU's Avatar
TOMxEU TOMxEU is offline
Very Frequent Poster
 
Join Date: Oct 2005
Location: Slovakia
Posts: 1,534
Default Re: How often do you use batch files to automate tasks?

I use batch only after clean instal to remove some files, but I am still looking for its functions.
__________________
Real-Time: Nothing | On-Demand: Nothing [ Lenovo E525 | Yandex | CCleaner | KC SUMo | WiseCare 365 ] ( BlackViper / DEP / OpenDNS / UAC / WiFiRouter )
  #5  
Old January 5th, 2007, 09:03 AM
ASpace
 
Posts: n/a
Default Re: How often do you use batch files to automate tasks?

I use them rarely on my personal computer but more often to install NOD32 EE faster and preconfigured on clients' machines . Also at the office some use them to run some old DOS programs
  #6  
Old January 5th, 2007, 09:41 AM
Mrkvonic Mrkvonic is online now
Linux Systems Expert
 
Join Date: May 2005
Posts: 7,433
Default Re: How often do you use batch files to automate tasks?

Hello,
I use them quite often, to perform backups, cleanups, defrags etc.
Mrk
__________________
http://www.dedoimedo.com

All your base are belong to us

Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA
  #7  
Old January 5th, 2007, 01:34 PM
lucas1985's Avatar
lucas1985 lucas1985 is offline
Global Moderator
 
Join Date: Nov 2006
Location: France, May 1968
Posts: 4,047
Default Re: How often do you use batch files to automate tasks?

Quite often (audio and system related tasks). Also, I´m learning scripts.
  #8  
Old January 5th, 2007, 01:40 PM
WSFuser WSFuser is offline
Incredibly Massive Poster
 
Join Date: Oct 2004
Location: California, USA
Posts: 10,324
Default Re: How often do you use batch files to automate tasks?

i dont use batch files; or maybe i do but dont know.
__________________
  #9  
Old January 5th, 2007, 01:40 PM
TOMxEU's Avatar
TOMxEU TOMxEU is offline
Very Frequent Poster
 
Join Date: Oct 2005
Location: Slovakia
Posts: 1,534
Default Re: How often do you use batch files to automate tasks?

Can someone please post his batch files, I would like to see, what it can do. This is mine.
__________________
Real-Time: Nothing | On-Demand: Nothing [ Lenovo E525 | Yandex | CCleaner | KC SUMo | WiseCare 365 ] ( BlackViper / DEP / OpenDNS / UAC / WiFiRouter )
  #10  
Old January 5th, 2007, 04:15 PM
Mrkvonic Mrkvonic is online now
Linux Systems Expert
 
Join Date: May 2005
Posts: 7,433
Default Re: How often do you use batch files to automate tasks?

Hello,

Here's an example for creating virtual hard disks using qemu.
This is for creating a 8GB .vmdk hard disk for VMware.

c:
cd \
cd program files\qemu
qemu-img.exe create -f vmdk generic_8G.vmdk 8G
copy generic_8G.vmdk g:\0_generic_hard_disks
del generic_8G.vmdk

Save as a text file and then simply change the extension to .bat.

I have some 15-20 scripts running, in Linux even more.

Mrk
__________________
http://www.dedoimedo.com

All your base are belong to us

Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA
  #11  
Old January 5th, 2007, 05:57 PM
herbalist
 
Posts: n/a
Default Re: How often do you use batch files to automate tasks?

I use quite a few batch files. They're incredibly useful, especially on the DOS based systems. BTW, if you like automating tasks with batch files, take a look at Launchkey. It's great for use with batch files, enabling you to send keypresses to apps. It can also send mouseclicks to apps that weren't designed to accept keyboard entries. I use it in several batch files, including one that ran ID blaster for one cycle each time my modem dialed out. Here's how to work ID blaster with Launckey via a batch file. My scheduler has a "window watcher" feature than can run an app when a specified window is detected, in this instance, the dialup connection window.
Code:
@echo off C:\launchkey "{WAIT=2000}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{enter}{WAIT=500}{ALT}{WAIT=200}FE" "C:\PROGRAM_FILES\ID_BLASTER_PLUS\IDBLASTERPLUS.EXE"
I use Launchkey with Clipboards in several batch files that capture several screenshots at short intervals. With the Launchkey path being C:\launchkey.exe and Clipboards running in the tray, this batch file will capture 9 active window screenshots at .5 second intervals:
Code:
@echo off C:\Launchkey "%%{PRINTSCREEN}" C:\Launchkey "%%2" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%3" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%4" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%5" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%6" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%7" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%8" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}" C:\Launchkey "%%9" C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}"
The time intervals are in milliseconds, defined by {WAIT=500}. To convert to full screen captures, edit each instance of
C:\Launchkey "{WAIT=500}%%{PRINTSCREEN}"
to
C:\Launchkey "{WAIT=500}%{PRINTSCREEN}"

When I had BitDefender and Acronis installed, I didn't want all the extra autostart entries they created. I removed all their autostart entries from the registry and a used batch file to start the necessary processes when I wanted to use one of them.

I also use batch files to copy my registry and core system files and overwrite them with the archived copies during each reboot. They're described
here. The ones I use also delete the index.dat files.
I also use a modified version of these to extract a separate registry and other system files from an encrypted archive, and replace the default copies during a reboot. I have several apps installed in this encrypted partition that run normally when the alternate files and registry are used, but there's no evidence of their existence when the default system is running. Almost a hidden operating system. These batch files also make use of the DOS component of eraser to destroy the alternate files when I switch back to the default system.

DOS and batch files are one of the reasons I stay with Win98. While it's not nearly as powerful as Linux command line, you can do a lot at a system level that isn't possible on an NT system.
Rick
  #12  
Old January 5th, 2007, 06:48 PM
Meriadoc's Avatar
Meriadoc Meriadoc is offline
Very Frequent Poster
 
Join Date: Mar 2006
Location: Cymru
Posts: 2,642
Default Re: How often do you use batch files to automate tasks?

Quote:
batch files, I would like to see, what it can do.
depends
start program maximised START /M C:\WINDOWS\NOTEPAD.EXE
remotedown.bat...shutdown -s -m \\name
restart.bat...shutdown -r
tmpclean.bat...c:\windows\command\deltree /y c:\windows\temp
del c:\windows\tempor~1\*.zip
del c:\windows\tempor~1\*.exe
then quicken up a bit more by having sortcuts/key press for the files.
__________________
Who controls the past controls the future
Who controls the present controls the past

vmworld
  #13  
Old January 6th, 2007, 02:20 AM
TOMxEU's Avatar
TOMxEU TOMxEU is offline
Very Frequent Poster
 
Join Date: Oct 2005
Location: Slovakia
Posts: 1,534
Default Re: How often do you use batch files to automate tasks?

Well, it seems that bat is quite usefull, I shall look at it. Thanks to all.
__________________
Real-Time: Nothing | On-Demand: Nothing [ Lenovo E525 | Yandex | CCleaner | KC SUMo | WiseCare 365 ] ( BlackViper / DEP / OpenDNS / UAC / WiFiRouter )
  #14  
Old January 6th, 2007, 05:01 AM
EASTER.2010
 
Posts: n/a
Default Re: How often do you use batch files to automate tasks?

With my other (dual-drive) 98SE i made extensive use of batch files, and also plenty of VBS files also. I need to get back into the swing of things with them again. I done some incredible "MAGIC" on my Win98SE with those files and actually had fun working with them. I used them to AUTOMATE about anything my heart desired and i was never disappointed once.

Thanks for the reminders. Very worthwhile.
  #15  
Old January 6th, 2007, 07:30 AM
nadirah nadirah is offline
Massive Poster
 
Join Date: Oct 2003
Posts: 3,647
Default Re: How often do you use batch files to automate tasks?

I use batch files to automate downloading of my favourite porn videos from porn sites. Just joking.

I never use batch files at all even though I know of them. Just my personal preference as I prefer to perform tasks manually by myself.
  #16  
Old January 6th, 2007, 08:29 AM
The Gorilla's Avatar
The Gorilla The Gorilla is offline
Regular Poster
 
Join Date: Apr 2005
Location: England
Posts: 66
Question Re: How often do you use batch files to automate tasks?

Would not have a clue what to do,

Any ideas where the easiest place to learn is?
  #17  
Old January 6th, 2007, 08:46 AM
Mrkvonic Mrkvonic is online now
Linux Systems Expert
 
Join Date: May 2005
Posts: 7,433
Default Re: How often do you use batch files to automate tasks?

Hello,
How about here?
Plus, Linux is the father of CLI. DOS is a mother of CLI.
You could install FreeDOS in VMware and then play with DOS. I have an article about that.
Mrk
__________________
http://www.dedoimedo.com

All your base are belong to us

Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA
  #18  
Old January 6th, 2007, 09:41 AM
lucas1985's Avatar
lucas1985 lucas1985 is offline
Global Moderator
 
Join Date: Nov 2006
Location: France, May 1968
Posts: 4,047
Default Re: How often do you use batch files to automate tasks?

Quote:
Originally Posted by The Gorilla
Any ideas where the easiest place to learn is?
This thread.
Mrkvonic´s site
Google
Link1
Link2
Book
  #19  
Old February 4th, 2007, 05:16 PM
Anti_Virus's Avatar
Anti_Virus Anti_Virus is offline
Infrequent Poster
 
Join Date: Feb 2007
Posts: 26
Default Re: How often do you use batch files to automate tasks?

Cleaning disk,
Defragmentation and finally,
for shutting-down the PC.
  #20  
Old May 14th, 2009, 11:06 AM
progress
 
Posts: n/a
Smile Re: How often do you use batch files to automate tasks?

Never, I think there is no reason to use them nowadays
  #21  
Old May 14th, 2009, 10:49 PM
axial axial is offline
Frequent Poster
 
Join Date: Jun 2007
Posts: 476
Default Re: How often do you use batch files to automate tasks?

I often use batch files, every day.
One example I use the Microsoft DevCon utility

http://msdn.microsoft.com/en-us/library/ms792824.aspx

to rescan attached devices, so that external SATA drives can be hotplugged in/out and their drive letters removed on demand.

I have a batch file called "RescanDrives.cmd" which contains the following:

c:\progra~1\utils\DeviceConnection\devcon.exe rescan
pause

and on my desktop I have an icon called "Rescan" that calls the batch file as the target, e.g.
"C:\Program Files\Utils\DeviceConnection\RescanDrives.cmd"
  #22  
Old May 15th, 2009, 12:37 AM
Eice's Avatar
Eice Eice is offline
Very Frequent Poster
 
Join Date: Jan 2009
Posts: 1,413
Default Re: How often do you use batch files to automate tasks?

I use two: one for launching a legacy game and all its helper applications so that all I have to do is run that one batch file as administrator. The other one is as follows:
Code:
cd /d D:\Programs\Chromium bitsadmin /transfer latest http://build.chromium.org/buildbot/snapshots/chromium-rel-xp/LATEST %temp%\LATEST setlocal enabledelayedexpansion set SEPARATOR=/ for /f "delims=" %%a in (%temp%\LATEST) do ( set filecontent=%%a ) bitsadmin /transfer chrome http://build.chromium.org/buildbot/snapshots/chromium-rel-xp/%filecontent%/chrome-win32.zip %temp%\chrome-win32.zip rd /s /q Chromium-backup ren Chromium Chromium-backup "c:\Program Files\7-zip\7z.exe" x %temp%\chrome-win32.zip ren chrome-win32 Chromium del %temp%\LATEST
It's scheduled to run at 5am every day. Very convenient indeed.
  #23  
Old May 22nd, 2009, 02:15 PM
demonon
 
Posts: n/a
Default Re: How often do you use batch files to automate tasks?

I use them a few times a week.
They are higly useful once you know what their capability.
  #24  
Old May 22nd, 2009, 05:30 PM
lodore lodore is offline
Incredibly Massive Poster
 
Join Date: Jun 2006
Posts: 8,876
Default Re: How often do you use batch files to automate tasks?

Daily!
I use a batch file to image my system Daily.
I dont see the point in using a batch file for defrag. I simply create a shortcut for JKdefrag and add the commandline parameters on the end and then add to task Scheduler. same sort of thing for CCleaner really add Scheduled task and add the commandline parameters.
I also have a batch file for starting 4OD to i dont have to have the service running all the time and dont need the auto start entrie.

eeek just looked at the thread start date holy thread resurrection batman!
__________________
useful tools:cure it SAS Hitman Pro mbam KL Eset windows defender offline Sophos

Last edited by lodore : May 22nd, 2009 at 05:38 PM.
  #25  
Old May 22nd, 2009, 09:06 PM
TonyW TonyW is offline
Very Frequent Poster
 
Join Date: Oct 2005
Location: UK
Posts: 2,301
Default Re: How often do you use batch files to automate tasks?

Not using any batch files.
 

Wilders Security Forums > Other Topics > polls « Previous Thread | Next Thread »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Settings
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 09:34 AM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2013, Wilders Security Forums