-
:** automatically creates catalogs based on the date they were last modified for categorization.
echo off
BAT-GO member [wkdxz] at:2010-08-04 11:17:23 |
setlocal enabledelayedexpansionfor /f "delims=" %%a in ('dir /b/s/a-d 2^nul') do (
set "a=%%~ta"
set a=!a:~,10!
set a=!a:-=.!
nul & move "%%a" !a!\ 2>nulecho ok
pause
-
I'm wkdxz added upstairs, and I can't change it.
:** automatically creates catalogs based on the date they were last modified for categorization.
echo off
BAT-GO member [wkdxz] at:2010-08-04 11:17:23 |
setlocal enabledelayedexpansionfor /f "delims=" %%a in ('dir /b/s/a-d 2^>nul') do (
set "a=%%~ta"
set a=!a:~,10!
set a=!a:-=.!
nul & move "%%a" !a!\ 2>nulecho ok
pause
-
@echo off & title is categorized according to the date modified by Yimengqin Yao.
cd /d %~dp0
setlocal enabledelayedexpansion
if not exist !nowym! md !nowym!
for /f "delims=" %%a in ('dir /a-d/b/tw') do (
if not "%%~fa"=="%~f0" (
set fileym=%%~ta
set fileym=!fileym:~,4!!fileym:~5,2!
if !fileym! equ !nowym! move "%%~a" !nowym!\)
pause
-
Do you want to read this file? Or is it just the last 1 time? If you don't read the file as long as the last modified time, you can read the modification time of the file itself directly, using % t1, the specific structure is as follows:
…Other**......call: The path to the GetLastTime file.
-
@echo off
rem to get the time when the file was modified.
setlocal enabledelayedexpansionfor /f "skip=1 tokens=1,3,5 delims=. " %%a in ('wmic datafile where name^="r: test22 to create a new text document.
txt" get lastmodified') do (
if %%a lss 0 goto endset a=%%a
if !b! gtr 30 echo !b!The file was modified 30 minutes ago.
endpause
Suppose the specified file is New Text Document. txt.
-
It's not so simple to judge that minutes can be solved, what if it spans hours, days, months, and years?
-
@echo off
set file="d:\"
for /f "tokens=1,2" %%i in ('dir /tw %file%^|find "/"') do for /f %%k in (
>)do if %%k gtr 30 echo warning! The last modification time is %%k minutes ago.
pause
-
' 2>
set fso=createobject("")n=3 'Documents older than 3 days.
b="Folder path" 'Copy to folder b.
dof=d=datevalue(
if d<=datevalue(dateadd("d",-n,now)) then
if not then "Folder -",b,"does not exist"
f,b&"\"
end if
loop until
-
Do you want to read this file? Or is it just the last 1 time? If you don't read the file as long as the last modified time, you can read the modification time of the file itself directly, using % t1, the specific structure is as follows:
Other**......
call: The path to the GetLastTime file. Other**......
goto:eof
getlasttime
echo %~t1
goto:eof
If you want to output the last 5 lines, you'll have to read the file, which is structured as follows:
set n=5: Changing 5 to 3 means that the last 3 lines set a line=0
for "usebackq" %%i in ("The path to the file") do set /a line+=1
set line-=%n%
more +%line% "The path to the file"
-
You can't be accurate to the second, only to the minute. There's no need to do that. After each file is modified, the archive attribute is a. After executing the command, clear the archive attributes, and then run + clear as long as there are archive attributes.
echo off
Command to run &attrib -a
attrib "a"||start another command to run.
-
xcopy d copies only files that are more recent than the original file modification time.
-
Use the dir command.
Use the o sort parameter, which is explained below:
o List files in categorical order.
Sort order n by name (alphabetical) s by size (from smallest to largest).
e by extension (alphabetical) d by date time (first to last) g group directory precedence - the prefix in reverse order uses the s parameter, which is explained below:
s displays files in the specified directory and all subdirectories.
For example, millet seeds: sorted by modification time, from old to new.
dir /s /od
Sort by modification time, from newest to oldest.
dir /s /o-d
attrib c: windows system32 +h, pay attention to the spaces. >>>More
echo off
del C: Windows System32 adds this batch to the startup of the menu. >>>More
Summary. Attacking with vicious language is a kind of conflict to vent one's own psychology, which is regarded as verbal violence. >>>More
RAR is the decompression software zip can be extracted directly under XP! >>>More
How to deal with the newly bought pen, it is recommended that you go to the encyclopedia to enter the two words of the pen, which is very good, I cut and paste the specific content for your reference. >>>More