Here are a few ways to:
1, the use of DOS commands, in DOS There are three ways to choose:
Use screen Editing command copy con. htaccess, enter the content, and finally press Ctrl+z end Edit, the successful generation. htaccess;
Using the rename command ren 1.txt. htaccess, this is the most common method, in Windows window can not be executed under the command, under CMD but Luliping;
Use the redirect command echo. >.htaccess, you can also create success by entering a carriage return character into the. htaccess.
2, with the WinRAR file Manager, the first new article document, and then open the WinRAR main interface, to locate the file, you can directly rename, this is I in the decompression of a foreign open source project, With its own. Htaccess actually can extract the correct, the inspiration, of course, you use 7zip and so on Manager is also OK.
3, directly through the text editing tools to save, such as Notepad, UltraEdit, etc., but save the time to select all the files on it, this is really a way to beat.
4, use the file creation method in PHP, fopen,file_put_contents file name directly take. htaccess.
5. Save the following code as a. bat file and drag any file onto the file icon to remove the filename and retain only the suffix.
The code is as follows |
Copy Code |
@ren "%~f1". * |
is to invoke the Cmd.exe ren (rename) command:
1, @ represents the display of the hidden command itself
2, the first parameter is the source file path containing the file name and suffix
3, the second parameter meaning is to retain the file name and suffix of the first point and later parts. So the 2L answer is problematic, and it will rename A.a.txt to. a.txt instead of. txt
The correction is as follows (where the second parameter is the suffix):
code is as follows |
copy code |
@ren "%~f1" "~ X1 " |