The specified path is known, and the folder under that path is the number of record OK. However, the capacity limit for each folder is 100 files, the naming rules for folders are 0000,0001,0002,0003, and so on. What should I do if I want to count the total number of OK files under this path?
Reply to discussion (solution)
Traverse folder (Scandir) to get the number of files under a folder
The result is not right:
ts404>>>mec91-172b1>>>2825 0---0
ts404>>>mec91-172b1>>>2827 0---0
ts404>>>mec91-172b1>>>2828 0---0
ts404>>>mec91-172b1>>>2901 0---0
ts404>>>mec91-172b1>>>2903 0---0
ts404>>>mec91-172b1>>>2904 0---0
ts404>>>mec91-172b1>>>2906 0---0
ts404>>>mec91-172b1>>>2907 0---0
ts404>>>mec91-172b1>>>2909 0---0
ts404>>>mec91-172b1>>>2910 0---1
ts404>>>mec91-172b1>>>2914 0---0
ts404>>>mec91-172b1>>>2915 0---2
ts404>>>mec91-172b1>>>2917 0---0
ts404>>>mec91-172b1>>>2921 0---0
ts404>>>mec91-172b1>>>2x19 0---0
ts404>>>mec91-172b1>>>2x23 0---0
Ts404>>>mec91-172b1>>>2x26 0---0
Ts404>>>mec91-172b1>>>2x29 0---0
TS404>>>MEC91-172B1>>>2X30 0---0
TS404>>>MEC91-172B1>>>2Y02 0---1
---The front, it's all 0.
File structure:
Assuming that your program files are at the same peer as the DAT directory, there are
$path = ' dat/*/*/3x*/{0,1,2,3,4,5,6,7,8,9}*/*.* '; $a = Glob ($path, glob_brace); Echo count ($a);
You can print out an array of results $a look at
Assuming that your program files are at the same peer as the DAT directory, there are
$path = ' dat/*/*/3x*/{0,1,2,3,4,5,6,7,8,9}*/*.* '; $a = Glob ($path, glob_brace); Echo count ($a);
You can print out an array of results $a look at
What if I access it via FTP?
Assuming that your program files are at the same peer as the DAT directory, there are
$path = ' dat/*/*/3x*/{0,1,2,3,4,5,6,7,8,9}*/*.* '; $a = Glob ($path, glob_brace); Echo count ($a);
You can print out an array of results $a look at
Local access really can, if like \\192.168\e\dat this form? How to access? Can I switch to FTP access?
Must you use PHP?
If you use the Linunx command, it is simple.
Find folder-type F |wc-l
Assuming that your program files are at the same peer as the DAT directory, there are
$path = ' dat/*/*/3x*/{0,1,2,3,4,5,6,7,8,9}*/*.* '; $a = Glob ($path, glob_brace); Echo count ($a);
You can print out an array of results $a look at
Local access really can, if like \\192.168\e\dat this form? How to access? Can I switch to FTP access?
You need to connect the FTP first and then execute the Glob