following batch file is therefore incorrect:
@ECHO off
XCOPY C:\AUTOEXEC. BAT D:\
IF ERRORLEVEL 0 ECHO successfully copies files
IF ERRORLEVEL 1 ECHO does not find the copy file
IF ERRORLEVEL 2 ECHO user aborts copy operation via Ctrl-c
IF ERRORLEVEL 3 ECHO preset error prevents file copy operation
Write disk error in the IF errorlevel 4 ECHO copy process
Whether or not the copy succeeds, the following:
Copy file not found
User aborts copy operation
This is a little trick to take the steps of manually removing cookies.
The first step: Create a new text file on the desktop for "one Step Clear cookies.txt", change the extension to bat, or "step clear cookies.bat".
Step Two: Right click on the file--"edit"--enter "
@echo off
del/q "C:\Documents and Settings\??? \cookies "
Which "??? "You can get it in the address bar of the" Start "-" Run "-Enter the" cookie "return. Save exit.
The next time t
The batch program deletes itself. bat
Echo Sometimes we need a batch program to delete itself after the execution is done, and you can use Del%0
Cases:
Copy Code code as follows:
@echo off
echo presses any key and I will delete myself
Pause
Del%0
However, if your batch process needs to change the current batch to a directory, there will be errors that do not achieve our predictable results.
For example: The current batch name
=superhero
Set temp=%a:~-3%
Echo%temp%
Pause
The Ero display shows the penultimate three characters of variable A.
If the following
Copy Code code as follows:
@echo off
Set A=superhero
Set temp=%a:~0,-3%
Echo%temp%
Pause
The display of SuperH shows the No. 0 bit of variable A and all the characters contained in the first-3 digits.
Bat Intercept String instance
Copy Code code as follows:
12, so we can use the code as follows:
Copy Code code as follows:
@REM produces 10 random numbers between [4,12]
@echo off
REM enable deferred environment variable extension
Setlocal enabledelayedexpansion
REM sets the minimum and maximum values of random numbers and the variables used for modulus
Set min=4
Set max=12
set/a Mod=!max!-! min!+1
FOR/L%%i in (1,1,10) do (
REM produces a random number between [Min,max]
set/a r=!random!%%!mod!+!min!
Echo.
Create a new bat processing file, named Timer.bat, with the following code:
Copy Code code as follows:
@echo off
: A
REM Gets current time score
Set currenttime=%time:~0,2%%time:~3,2%
rem Echo time:%currenttime%
rem Invoke script: "J:\lanp\ pdf.pdf Classic Story high-definition" | Start/b
If%currenttime%==1856 (SHUTDOWN/S/t 60)
Goto:a
Pause
Create a new VDS file, named Autorun.vbs, with the following code:
Copy Code cod
Windows batch files do not have a Linux-like sleep function for latency processing, there are 2 more practical ways to implement latency:
1, the use of wscirpt sleep function, precision 0.001 seconds
Create a VBS delay file, and then invoke it in a batch file, using the WScript sleep function, to achieve the effect of sleep.
Actual combat:
1 Create file Sleep.vbs:
echo Wscript.Sleep 5000 > Sleep.vbs
Sleep.vbs contents are as follows:
Wscript.Sleep 5000.
2 in a batch file, create the samp
I want to change the volume label of the virtual drive that I created with subst.The following command is known to be unable to change the letter created by subst
@echo off
subst x:c:\personalfiles
wmic logicaldisk where "deviceid= ' X: '" Set volumename= "Development"
Pause
But you can use this VBS script to change
Set Oshell = WScript.CreateObject ("shell.application")
oshell.namespace ("X:\"). Self.name = "Development"
To be honest, VBS is unfamiliar with ...I cha
This article is transferred from the network, because cannot find the original author, therefore cannot know the origin. If you are lucky enough to see the original author, please contact me plus. Reproduced here first.
The last few days overtime plus crazy off, every night can not sleep. One of the core programs in the development department is that it's always going to go down on its own, and then it needs to be done by hand, and the service is so secure that I can do it, and I can't sleep at
In recent days, the financial is always noisy network printer, taught her several times in cmd input net use \\192.168.10.131/user:guest enter the password, it is annoying, directly wrote a bat script to her use.
Script content:
Copy Code code as follows:
@echo off
echo Add Network printer
Echo Waits ....
sc config spooler start= auto
net stop spooler net start spooler
REM simply replaces the following IP, printer name, account number,
MONGO Shell startup configuration file. Mongorc.js (ii)If you have a. mongorc.js file under your home directory, he will run automatically when you start the shell. Use it to initialize any helper methods you use frequently and delete methods that you do not want to accidentally manipulate.For example, you do not want to use the default Dropdatabase () method, and you can add the following command to the. mongorc.js file:DB.prototype.dropDatabase = fu
Data: Database article number more than 200W, every day around 3K increase.Status: Lucene 2.9 + Pangu participle, read and write separation. The index file reaches more than 1G, and the list reads more and more slowly.Requirements: Front page Implementation list seconds out, retrieve seconds out, enhance the user experience.---------------------------------------------------------------------------------Skipped Ms-sql partition, sub-Library, full-text index ... On MongoDB------------------------
This article mainly introduced about the MONGO index of some of the notes, has a certain reference value, now share to everyone, the need for friends can refer to
Index usage Scenarios
Excellent: Faster query speed
Inferior: Add and delete will incur additional overhead, occupy space
Tips: Returns more than half of the data in a collection, with high efficiency for full table scans
Index base
Basic operations
View index: Db.test.getIndexes ()
CREATE
replace; alter database $ dbname set online"
Incremental recovery: osql-U $ user-P "$ password"-d master-S $ instance-Q "alter database $ dbname set offline with rollback immediate; restore database $ dbname from disk = '$ filename' with replace, NORECOVERY; restore database $ dbname from dist =' $ diff_filename 'with recovery; alter database $ dbname set online"
III. oracle:
Oracle uses rman for backup and recovery. if you are interested, you can learn more about the specific use of rman.
IV.
.③: Finally to see whether the open success, the information learned that MongoDB uses 27017 port, then we will type "http://localhost:27017/" in the browser,After opening, MongoDB tells us that on 27017 add 1000 can view MongoDB's management information in HTTP mode.Three: basic operationBecause it is the beginning, about the basic "additions and deletions to change", we open a cmd, enter the MONGO command to open the shell, in fact, this shell is th
Reference Documentation:
http://bbs.csdn.net/topics/390906498
2-Insufficient hard disk space to free the deleted MongoDB collectionhttps://segmentfault.com/q/10100000024145763-MONGO operation after culling large tableHttp://www.myexception.cn/open-source/1441621.html4-MongoDB Copy Database Copydatabase (). Implement methods to free up disk space. Http://www.111cn.net/database/MongoDB/56304.htmMONGO free disk space after deleting a table or lib
.next ();}var page2=db. Log.find ({"Createtime": {"$GT": Createtime.createtime});Page2.sort ({"Createtime": -1}). Limit (100);So in C # I think it should probably be this way, of course, this is only a demonstration, it must not be in this function to query the results of the last time, or again query, directly to the last query results pass over the good ' Public StaticListintPageSizeintpagenum) {Mongodatabase db=mongohelperfactory.getdatabase (); Mongocollection Collection= db. Getcollectio
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.