SET dir=%~dp0
SET /a cnt=0
echo dir is: %dir%
cd /d %dir%
for /R %dir% %%i in (*.apk) do (
set /a cnt=cnt+1
echo %%~nxi>>1.txt
)
echo %cnt%
pause

The purpose of the above is to WINDOWS Next, recursively traverse a folder ( Include subfolders ), Find out how many apk file , Output quantity , And apk The file name of the 1.txt in

CMD More about recursive folders

  1. CMD Copy folder

    CMD Copy folder xcopy /E/I/Y "D:\GitHub\WIP\app" "D:\GitHub\WIP_server\html\webshell"

  2. Python Create recursive folder

    # Create recursive folder def createfiles(filepathname): try: os.makedirs(filepathname) except Exception as err: pri ...

  3. How to use cmd The command recurses all specific files in the folder , Copy to another folder

    Now there's a folder , There are many subfolders in it , There are many different types of pictures in each subfolder , Now I want to make it all .png Sort out the pictures , At first I copied it manually , After copying a few pictures , Suddenly I wonder if I can let the computer complete this function automatically , After a taste ...

  4. use cmd Encrypt folder

    With the wide use of computers , Personal computers have more and more private space , A lot of people like to store some personal privacy files on the computer , Of course, I don't want other people to see the privacy documents , In order to prevent others from seeing their own documents , There can be many ways , I read some documents on the Internet today , Learn to ...

  5. java Delete recursive folder and files under folder

    public static void delUrlLocalFile(String urlPath) { File file = new File(urlPath); if(file.isDirect ...

  6. Python【day 14-4】sorted filter map+ Recursive folder + Binary search

    def func(x): # Ordinary function return x*x ret1 = func(10) # Anonymous functions f = lambda x:x*x # Anonymous function writing : Anonymous function name =lambda Parameters : Return value ' ...

  7. php Fast infinite traversal recursive folder Directory 、 Sub file , Support absolute path and relative path , Support return to generate array

    Support unlimited traversal of sub files and folders , Support absolute path and relative path ! Function description :array glob ( string $pattern [, int $flags ] ) function : Find the file path that matches the pattern , Return contains ...

  8. Windows cmd Operation folder

    ir // List all the folders in the directory rd dirname // Delete dirname Folder ( Empty folder ) rd /s/q dirname // Delete dirname Folder ( Non empty )

  9. cmd When copying a folder , Handling tips

    xcopy If this subdirectory does not exist on the target disk , And at the end of the target disk is not "\" For the end , It will prompt : does destination specify a file name or direct ...

Random recommendation

  1. Qt create To configure git version management

    Configuration steps : git Download and install .( here , You should understand git and github The difference between ) Here's the picture 1-5,Tool –> Options –> Version Control –> Git –&g ...

  2. 【BZOJ 2152】 Cong cocoa Point divide and conquer

    For a tree ,fdrt Find the center of gravity , Then divide each subtree . On a tree rooted in the center of gravity , The eligible chain is : 1. Over the center of gravity ( root ) 2. But the center of gravity about 1 We only need dfs Out of the center of gravity ( root ) Then count and subtract the overlapping edges about 2 I ...

  3. One 、HTML and CSS Basics --HTML+CSS basic course -- The first 6 part

    Chapter 11 CSS Code abbreviations , Less bandwidth Box model code shorthand : Remember the outside margin when talking about the box model (margin). padding (padding) And borders (border) The margins in the up, down, left and right directions are set clockwise : On ...

  4. ctrl + z fg bg

    [root@bass ~]# jobs [1]+ Stopped vncviewer 192.168.1.17:5904 [root@bass ~]# #ctrl + z [root@bass ~]# ...

  5. for Circulation and complexity if else Example

    for Loop statement Patients with a . Please enter an integer , seek 1 Add to the sum of this integer Example 2 Please from 1 To 100 Inside and 7 The relevant figures Example 3 , Please design a game , front 20 The score of each level is itself ,21 To 30 yes 10 Each level is divided .31 To 40 yes 20 Each ...

  6. Object Pascal Exception handling in grammar

    http://www.cnblogs.com/spider518/archive/2010/12/30/1921298.html 3 Structured exception handling Structured exception handling (SHE) It's a way to deal with errors , bring ...

  7. HTML Right click is forbidden

    <html> <script type="text/javascript"> <!-- document.oncontextmenu=function ...

  8. c++ string The object operation

    The string conversion case is as follows : #include "stdafx.h" #include <iostream> #include <string> using na ...

  9. 201521123111《Java Programming 》 The first 3 Weekly learning summary

    1. Summary of this chapter Your summary of this chapter 2. Written work 1. Code reading Code reading public class Test1 { private int i = 1;// This line cannot be modified private ...

  10. NOIP- Prime factor decomposition

    Title Description We know positive integers n It's the product of two different prime numbers , Try to find the larger prime number . Input description : There is only one line of input , Contains a positive integer n. Output description : There is only one line of output , Contains a positive integer p, The larger prime number . #include&l ...