In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
FORFILES [/ P pathname] [/ M searchmask] [/ S]
[/ C command] [/ D [+ | -] {yyyy/MM/dd | dd}]
Description:
Select a file (or group of files) and on that file
Execute an order. This helps batch jobs.
Parameter list:
/ P pathname indicates the path to start the search. The default folder is the current working directory (.).
/ M searchmask searches for files based on the search mask. The default search mask is'*'.
/ S instructs forfiles to recurse to a subdirectory. Like "DIR / S".
/ C command represents the commands executed for each file. The command string should be enclosed in double quotes.
The default command is "cmd / c echo @ file". The following variables
Can be used in a command string:
@ file-returns the file name.
@ fname-returns a file name without an extension.
Ext-returns only the extension of the file.
Path-returns the full path to the file.
Relpath-returns the relative path to the file.
@ isdir-returns "TRUE" if the file type is a directory
If it is a file, return "FALSE".
Fsize-returns the file size in bytes.
Fdate-returns the date the file was last modified.
Ftime-returns the time when the file was last modified.
To include special characters on the command line, use 0xHH
The form uses hexadecimal codes (for example, 0x09 is tab).
Internal CMD.exe commands should be preceded by "cmd / c".
/ D date Select a file whose last modified date is greater than or equal to (+)
Or less than or equal to the date specified in the "yyyy/MM/dd" format
"yyyy/MM/dd" format; or selects files with a
Current date plus "dd" days, or less than or equal to (-) current
Date minus "dd" days. Valid "dd" days can be
Any number in the range of 0-32768. If not specified
"+" is used as the default symbol.
/? This help message is displayed.
Example:
FORFILES /?
FORFILES
FORFILES / PC:\ WINDOWS / S / M DNS*.*
FORFILES / S / M * .txt / C "cmd / c type @ file | more"
FORFILES / PC:\ / S / M * .bat
FORFILES / D-30 / M. exe
/ C "cmd / c echo @ path 0x09 was changed before 30."
FORFILES / D 2001-01-01
/ C "cmd / c echo @ fname was new on January 1st, 2001."
FORFILES / D + 2018-2-1 / C "cmd / c echo @ fname is new today."
FORFILES / M * .exe / D + 1
FORFILES / S / M * .doc / C "cmd / c echo @ fsize"
FORFILES / M * .txt / C "cmd / c if @ isdir==FALSE notepad.exe @ file"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.