Windows cmd batch processing changes the file name to lowercase and cmd to lowercase
Directly run the Code:
@ Echo off setlocalsetlocal ENABLEDELAYEDEXPANSIONset path = "C: \ Users \ llq \ Desktop \ test" set suf = "*. doc "rem % path % # use variable for/f" delims = "% I in ('dir/B/s/a-d % path % \ % suf % ') do (set h = "% ~ Ni "for % j in (a B c d e f g h I
Windows installation Nodejs:
Node Download address: https://nodejs.org/download/Here is the 64bit.msi version.
Custom Installation path: D:\nodejs
To set the global installation save directory:
NPM config set prefix "D:\nodejs\node_global"
NPM config set cache "D:\nodejs\node_cache\" (first built Node_cache directory)
It is then installed directly into the global directory when the dependency is installed using the NPM-G command.
Install Express:
There are 2 more practical ways to delay processing a batch file in Windows without delaying the sleep function like Linux:1, using the sleep function of wscirpt, precision 0.001 secondsCreate a VBS delay file, and then call it in a batch
Output and standard Error and redirect them together-a single file.Make sure to the redirection "commands" in this order.
Use the >logfile.txt2>errorlog.txt redirect success and error messages to separate log files.
Use >CON to send text to the screen, no matter what, even if the batch file's output is redirected.This could was useful when prompting for input even if the batch
Backing up Oracle with a bat batch file (provided the Oracle database client is configured)Create a dbbackup directory under the D-Disk directory to build a Dbbak.bat@echo off Echo ================================================ Echo automatic backup script for Oracle database in Windows echo 1. Use the current date to name the backup
When using a batch file, you can use the following method to hit multiple cmd windows, and execute multiple commands in each window.Start is used to start an applicationCmd/k indicates that the window is not closed after the command after the CMD has finished executing. If you want to close the window after execution is complete, use/C. For more information, plea
Because I am in a place to often switch between different networks, such as local area network, system intranet and extranet (I will often switch between 3 ADSL networks). I have always used the method is to set up a number of different network segments of the IP, and then switch routes (Route), so that different network segments through different gateways out, you can access multiple networks at the same time to achieve the purpose. However, I found that there are often some problems, so I deci
I used to set multiple ip addresses of different network segments on the local machine, and then switch the route so that different network segments can go out through different gateways, you can access multiple networks at the same time. However, I often find that some problems may occur, so I decided to use the most primitive method to solve the problem, that is, to use only the ip address of a certain network segment, in this way, you need to constantly change the IP address. Of course, this
I used to set multiple ip addresses of different network segments on the local machine, and then switch the route so that different network segments can go out through different gateways, you can access multiple networks at the same time. However, I often find that some problems may occur, so I decided to use the most primitive method to solve the problem, that is, to use only the ip address of a certain network segment, in this way, you need to constantly change the IP address. Of course, this
Batch Modify file permissions in Windows 7
Previously, I set a folder to hide. After I reinstall the system, I found that I did not have the permission to modify the folder and could not be accessed or modified. I had to modify the permissions one by one.Then I searched for the solution on the Internet as follows:In the attachment-> command prompt-> right-click-
See also: http://blog.csdn.net/iw1210/article/details/39313677%date% Output: Yyyy/mm/dd week * (for example: 2008/12/18 Thursday)Reference format:%date:~x,y%x= start coordinates, y= the number of characters from XSuch as:%date:~0,4%-yyyy%date:~5,2%--mm%date:~8,2% to DDIf you remove the date formatted as YYYYMMDD:%date:~0,4%%date:~5,2%%date:~8,2%-->20081218%time% output is: hh24:mi:ss.ms (ex: 10:49:12.17)Reference format:%time:~x,y%x= start coordinates, y= the number of characters from XSuch as:%
Find an article on the Internet titled PostgreSQL windows automatic backup script
Http://blog.it580.com/1910
I thought it was good. After a try, I found that the execution of the batch processing file was stopped and I was prompted to enter the password.
> Pg_dump-u Postgres-W database1> C:/backup.tar> Password:
The method for automatically entering the passwo
Find a good example of learning Bat program code to share with you, the specific code is as follows:
@echo off
Route print-4 "10.0.0.0" | find "10.0.0.0" > Route_list
set gw=
for/f "Tokens=1-5"%%a in (' Typ E route_list ') do (
if not%%c "= =" (set gw=%%c)
)
if "%gw%" = "" (echo "fail to get eth0 default GW" amp; goto Error)
Route print-4 100.64.0.0 | find "%gw%" > NUL
if not "%errorlevel%" = "0" (
route-p Add 100.64.0.0 mask 255.192.0.0%gw% > NUL 2>1
)
if not "%errorlevel%" = = "0" (E
Reprint to http://my.oschina.net/u/660932/blog/117929One@echo offSetlocal enabledelayedexpansion:: Coder by Mark_li Powerd by IBAT 1.6CD "C:\Program files\mysql\mysql Server 5.5\bin":: Database name@set db=hrms:: User Name@set Username=root:: Password@set password=:: SQL Script to execute@set sqlpath= "C:\Program files\mysql\mysql Server 5.5\test_hrms.sql":: Connection to MySQL database and execute SQL script-F script execution, error continues execution--default-character-set Specifies the enco
to use are:
Create your task viaschtasks.exe /create /tn MyTask ...
Export your task to XML viaschtasks.exe /query /xml /tn MyTask > MyTask.xml
Update this XML via XSLT or a search/replace
Re-import (overwriting the old task) viaschtasks.exe /create /tn MyTask /xml MyTask.xml /f
::Modify Scheduled Task program, due to Chinese export error, so set the active code page number 437 MS-DOS American Englishchcp437::Start export of Task
, there is a concrete way to implement this function.
Here is an example of a test.
Windows batch File
Create a new text document, and write the following code, saved as a. bat file.
E: "E:\PHP\wamp\bin\php\php5.5.12\php.exe"-F "E:\PHP\wamp\www\write.php"
PHP run mode
Usually executes the PHP code, is through the brows
Label:More community recently, considering the security of data, to backup the database once a day, just in case; Linux is not very well known, first use the windows of the scheduled task it; The general idea is to borrow a scheduled task from Windows to perform a backup of the remote database locally; Mostly moved. HA: http://www.php-note.com/article/detail/388 First, PHP program: Borrow mysqldump to expor
be executed,Script 1:"D:\LogFiles\APPService\AppServer.exe"EXE file to be executedThe hidden window only needs to set the second parameter of run to 0, the display is set to 1;Script 2Set Winscripthost = CreateObject ("Wscript.Shell") Winscripthost.run Chr "Set Winscripthost = NothingThe hidden window only needs to set the second parameter of run to 0, the display is set to 1;Configuration such as:Set the time interval for execution as needed:Perfec
Add Task Scheduler under Windows XP system problem resolution frequently occursA scheduled task is to have the computer perform the specified action (scheduled action) within a specified time, either as a program or as a batch, but at least it can be run (some of which can be run by double-clicking). Add a step: Start, Settings, Control Panel and Task
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.