Skip to content

Instantly share code, notes, and snippets.

@deanpcmad
Created May 14, 2015 09:02
Show Gist options
  • Save deanpcmad/bc634e6f3fa794913fb8 to your computer and use it in GitHub Desktop.
Save deanpcmad/bc634e6f3fa794913fb8 to your computer and use it in GitHub Desktop.
Creates a full directory listing. Change P: to your drive and C:\Users\Dean\OneDrive\ServerFiles to your location
@echo off
For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%a-%%b-%%c)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
P:
tree /A /F > C:\Users\Dean\OneDrive\ServerFiles\%mydate%_%mytime%.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment