substituting here is Z, so we're going to change that I to Z, for example%~fi to%~FZ.As for the front of the%~p such content is the grammar!
Good to start the explanation:
~i-Remove any quotes ("), Extend%IThe role of this variable as his description, delete quotes!Let's look at this example:
First, we create a name for temp.txt text file on the desktop, enter it inside"11112222 ""3333"44 "44Then create a bat file with the following code:
for/f "
want to display multiple similar files consecutively, it is more convenient to use the copy command.(2) copy *. WPS/B conIf you only want to view the content of the WPS file, you do not need to enter the WPS. You only need to enter the command in the DOS state to find the required file.4. edit a simple text file: Copy con file name to be editedIt is troublesome to use other editing tools for simple text (such as autoexec.
Batch file bat and batch processing bat
Delete all files on drive d: del/a/f/q d :\*.*
Delete the file with the specified extension of the specified directory: del/a/f/q Directory: \ *. jpg
Delete the file with the specified extension in the current directory (the specified extension is jpg): del/a/f/q % cd % \ *. jpg
PS:
* As a wildcard/A/f is a file that forcibly deletes all attributes./Q is directly
Question one: If all files under the C:\a folder are now the same as those under d:\a (date and content of modification)
A file under C:\a was modified by someone else or a file was added!
Can you write a bat to determine if the final modification date for each file under the C:\a folder is not in the first two days! If it is, it is copied to the corresponding directory under D:\a (if it is, overwritten), and if it is not, it is not replicated.
Direc
Believe that a lot of friends have NetEase 163 or 126 of the mailbox, if you usually do not use foxmail such mail client tools to send and receive mail, but like through a Web browser to send and receive mail, then each time to open the mailbox login address, and then enter the username and password, it is trouble. Here's a quick way to sign in to NetEase 163 and 126 mailboxes, and opening and logging into 163 and 126 mailboxes is as simple as opening an application with a shortcut on the deskto
Show/Hide system files you need to right-click any folder or file to display the menu
Show/Hide extensions to display menus by right-clicking an empty space in any folder
Right-click to display (hide) extension and system files. bat
Copy Code code as follows:
@echo off
reg delete "hkcr\clsid\{00000000-0000-0000-0000-000000000012}"/F >nul 2>nul
reg delete "Hklm\software\classes\*\shell\displayfileext"/F >nul 2>nul
reg delete "Hklm\softw
Of course, you can also completely use the Bat operation registry to complete the registry to modify the value of the key, the specific way to stay after the perfect, if you have good ideas, remember to tell me Oh!
Usb_disable.bat File Code:
Copy Code code as follows:
@echo off
echo on Error Resume Next>usb_disable.vbs
Echo Dim Wshshell>>usb_disable.vbs
echo Set WshShell = WScript.CreateObject ("Wscript.Shell") >>usb_disable.vb
BAT batch One-key generation APK package script sharing
Place this bat in the COCOS2DX directory under the project.android of your project (modify variables).Asmaker uses the LUA file batch encryption algorithm under the resources folder to refer to my previous RC4 algorithm implementation.
APK the latest engineering code and COCOS2DX engine code for each package before you pack it up.
@echo off REM
Recently help a friend to make a simple courseware display, need such a function:
Get the number of files in a file directory in real time, I tried a lot of methods, finally found that its utility bat file is relatively convenient, such as the designation of several file directories, and then the number of their files (including subdirectories), the value into the specified text file, in order to read in real time, I did a loop:
The
Some of the components that we usually use when using ASP for network programming, because the components allow us to do complex operations easily, but the ASP defaults to not integrate all the components, so we need to install them when we need to use a component. Today is the way to install and uninstall ASP components through batch processing.
Suppose we want to install a component with the name Htmer.dll, first copy it to a location on the hard disk, and remember the path.
1, install the c
Sometimes we might come across, there are a lot of files in a folder, we need to modify the extension of these files, of course, we can change one by one, but if there are many files, it is very troublesome, so today I would like to teach you to batch modify the file extension method, I hope that we can use flexibility.
Let's say you want to change to. jpg The file with the extension. gif, so the following is the method:
1, first into the folder needs to change the extension of a new Notepad
Using Bat_to_exe_converter to convert the bat to Exe, download: http://www.jb51.net/softs/21398.html, there is also a spin-off benefit, unable to view the bat file source code.
Using Srvinstw.exe to register the EXE as a system service, download: http://www.jb51.net/softs/21399.html
Because they are all graphical interfaces, there is no need to explain them more. After registering successfully, you can see
"Scheme one" BAT + date.exe (GNU)
Copy Code code as follows:
@echo off
REM calls the GNU for Win32 Date.exe
Set "Gnudate=c:/test/date.exe"
REM Specifies the number of months
Set Monthsago=1
for/f%%a in ('%gnudate%-D "%monthsago% months ago" "+%%y-%%m-01") Do (
Set "Dstdate=%%a"
)
)
Echo,%dstdate%
Pause
"Scheme two" BAT + VBS
Copy Code code as follows:
Warning: Running bat source code is a dangerous action, if you are unfamiliar, please do not try!One-click Cleaning System Garbage File bat, easy to use, do not manually delete
Copy the code code as follows:@echo offEcho is cleaning up the system junk file, please wait a moment ...del/f/s/q%systemdrive%*.tmpdel/f/s/q%SYSTEMDRIVE%*._MPdel/f/s/q%systemdrive%*.logdel/f/s/q%systemdrive%*.giddel/f/s/q%systemdri
Today want to copy some files, you need to first judge the size of the file, small certainly there is a problem does not need to replicate, after a lot of testing finally found a better way, the need for friends can refer to the
Let's start with a simple sentence code:
Copy Code code as follows:
For/f%i in (' dir/b c:\450010.jpg ') do echo%~zi
Complete Code of Judgment:
Copy Code code as follows:
@echo off
:: Copy the following page every 5 minutes
local area network, there will be a server for users to use. However, because the local area network generally rarely set up DNS servers, access to these servers, to enter the difficult to remember the IP address. This is quite troublesome for many people. Now you can give these servers an easy to remember name, and then set up IP mapping in the hosts, so that when the next visit, as long as the name of the server to enter the line.3, shielding the siteNow a lot of web sites without user consen
A recent problem has been encountered because there is a whole host of local libraries that need to be installed, and the Depedency method used before is system, because it cannot be introduced automatically when package.
Therefore, you need to create an automated install batch script:
But always after executing a MVN target automatically exit, Pause command is also invalid, analysis of the reason for the mvn itself is a bat
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
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.