MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
This outputs something like this:
@echo off setlocal enabledelayedexpansion set LogFile=C:\Tools\staleAdPc.log if not exist "%LogFile%" goto SkipRename for %%f in ("%LogFile%") do ( for /f "tokens=1-3 delims=/ " %%a in ("%%~tf") do (set TimeStamp=%%c%%a%%b) set NewName=%%~nf.old.!TimeStamp!%%~xf echo Renaming "%LogFile%" to "!NewName!" ... ren "%LogFile%" "!NewName!" ECHO File date: %%~tf ) :SkipRename dsquery computer OU=Depts,OU=x,DC=x,DC=x,DC=x,DC=x -inactive 8 -limit 300 > c:\tools\staleADpc.log
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.