Re: Batch script in Windows to create filelist
2006-08-21 18:36:53
| -----Original Message-----
| From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On
| Behalf Of
| Richard Mochnaczewski
| Sent: Friday, August 18, 2006 08:07
| To: ADSM-L AT VM.MARIST DOT EDU
| Subject: [ADSM-L] Batch script in Windows to create filelist
|
|
| Hi,
|
| I need to create a filelist of files that exist in a
| directory that have been updated in the past 7 days and have
| the list of files backed up by TSM. Does anyone know how tis
| can be done be commands native to Windows without requiring
| any third party software ?
|
| Rich
|
This will get you most of the way there, though something in vbscript might
be better.
Also, check the delimiters in the 'for' statement - I assume that you're
using yyyy-mm-dd for the regional seetings for your date format - it may not
be compatible with the input needed for the xcopy command.
-----Begin Batch File-----
@echo off
for /F "tokens=1-4 delims=- " %%i in ('date /t') do (
set DayOfWeek=%%i
set Year=%%j
set Month=%%k
set Day=%%l
set Date=%%i %%j-%%k-%%l
)
cd %%mydirectory%%
xcopy *.* /l /e /d:%%k-%%l-%%j > c:\output.txt
-----End Batch File-----
|
|
|