VBS scripts and BAT batch processing methods for self-deletion (suicide)
Delete itself: VBS
Save the following script as selfkill. vbs or selfkill. vbe:
Copy codeThe Code is as follows: Set fso = CreateObject ("Scripting. FileSystemObject ")
F = fso. DeleteFile (WScript. ScriptName)
WScript. Echo (WScript. ScriptName)
Then run it. Did you find selfkill. vbs suddenly disappeared? The subsequent dialog box is
Background: Batch execution of commands for Linux servers and batch sending of files is the most fundamental part of the operations automation process, and this script is the implementation of this function, and the shell can also implement similar functions through expect.This script uses the Pexpect module, without w
An ftp script for searching and uploading updated files #! /Bin/ksh #################################### ##################### Date: 2012-12-19 # name: swiftftp. sh # decription: an infinite loop, which is executed once every minute. Search for files in the current directory that have been modified for more than 1 minute but not later than #2 minutes, ftp to the
expect_scp file, run the following command in shell:./Expect_scp 192.168.75.130 root 123456/root/src_file/root/dest_file
After the preceding command is executed, the src_file file in the local/root directory will be copied to/root in host 192.168.75.130 with the username root and password 123456, the source file is also renamed as dest_file.
Spawn indicates the
There are a lot of open source batch deployment tools that can be used, such as puppet, Ansible, Saltstack, chef.But these tools have their own set of grammar rules, you have to follow his syntax to write programs, and then batch execution.Is there a way to write bash or Python scripts directly and then execute them in batches?The method of course is that you need to write your own program to transfer scrip
file.D. bat batch Implementation start MongoDB scriptMongoDB Install bin path D:\Program files\mongodb\bin,mongodb in Data folder D:\Program Files\mongodb\data We should be like this in the cmd command window, start the MongoDB database CD D:\Program files\mongodb\bin
mongod --depath "D:\Program files\mongodb\data" But every time we have to knock on these, it really makes us very troublesome, so we can use bat's just to do such a bat
You have to run so hard to look back at people crawling.
Laziness is also needed to learn.
On their own blind, may even "this piece can be lazy" consciousness is not, once absorbed in other people's thinking, the next is much simpler
Do not wait for people to teach, do not wait for the "training", will lazy are lazy people, you do not take the practice of the specific problems encountered in the initiative to ask, they do not bother you
Split it! Sp
directory to back up MySQL ifnotexist%dir% ( Mkdir%dir%2>nul) ifnotexist%dir% (echo backuppath:%dir%notexists,createdirfailed. Gotoexit) echostartmysqldump...for%%iin (%databasename%) do (%mysql%mysqlduMp-h%host%-p%port%-u%username%-p%password%%%i>%dir%%%i-%now%.sql 2>nul) Echoendmysqldump:: Record the status of the main library and log records%mysql%mysql-h%host%-p%port%-u% username%-p%password%-bse "Selectnow (); Showmasterstatus\g" > %dir%mysql_status-%now%.logechodeletefilesbefore60days:: D
Files with the extension BAT (or CMD in NT/2000/XP/2003) are batch files.
===== Gjr note ========================================== =====. Bat is a batch processing file under DOS. CMD is another type of batch file in the NT kernel command line environment.In a broader sens
command to start or stop various sqlserver services, such: Net start SQLAgent $ sql2005de1
/*
Start the SQLAgent service in instance sql2005de1
*/ Net stop SQLAgent $ sql2005de1
/*
Stop the SQLAgent service in instance sql2005de1
*/
According to the net command, you can write a batch processing script to start various services of each instance. CopyCodeTo store the "Start stopsqlserver. Bat
The following describes how to implement batchcompute SQL scripts in DB2. If you have encountered similar problems in batchcompute, I believe it will help you learn about the batch execution of DB2.
Environment:
Windows
DB2 client or server
I. Preparations
Run db2cmd or db2cw to open the DB2 command line processor.
Enter the SQL script storage directory
Use the db2 connect to
Use db2 set current schema
2.
Files with the extension bat (or cmd in nt/2000/xp/2003) are batch files.
. Bat is a batch processing file under dos
. Cmd is another type of batch file in the nt kernel command line environment.
In a broader sense, unix shell scripts, as well as other operating systems, and
encounter services that frequently shut down the instance and start services of another instance to solve the resource shortage problem in Windows.
To solve the complex operation problems in the above case, you can use the Net command to start or stop various SQLServer services, such:
The Code is as follows:
Net Start SQLAgent $ SQL2005DE1/* Start the SQLAgent service in the instance SQL2005DE1 */Net Stop SQLAgent $ SQL2005DE1/* Stop the SQLAgent service in instance SQ
Requirements DescriptionGenerally in the production environment, in the case of put into operation, need batch to execute SQL script file, to complete the whole production, if the production file more than the case, undoubtedly this is a more painful process, so this article through PowerShell
the query in double quotes to enclose any content embedded in the query in single quotes.
-Q "Query"
executes the query when it starts osql, but does not exit osql when the query completes. (Note that the query statement should not contain go). If you are issuing a query from a batch file, use either%variables or the environment%variables%.
For example:
SET table = sysobjects
osql/q "Select * from%t
BAT batch processing: one-click generation of APK package script sharing
This article mainly introduces BAT batch processing, one-click APK package generation script sharing. This script applies to cocos2dx + lua projects. For more information, see
BAT
IOS uses scripts to batch pack channel packages and ios script channel packagesRecently we have received a new demand, need to play a xx001-xx100 like a total of 100 such ipa channel package, no signature. (These ipa packages will be signed with enterprise certificates in the future and will not affect the AppStore.) All functions and contents of these packages are the same, the difference is that different
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.