Batch or VBS Help

July 7, 2009 at 04:34:52
Specs: Windows XP SP2, P4

I'm after something really simple, hopefully.
I want to run a script on my R:\ Drive which is part of a server. All I want to do is pull back all the files, their path and last modified date in all of the subfolders and put this into a text file.
Is there an easy way to do this?
I've played with some of the scripts I've found on the forum but can't seem to get any to work.

See More: Batch or VBS Help

Report •

July 7, 2009 at 23:46:43
@echo off > %TEMP%\newfile & setLocal enableDELAYedexpansion

pushd r:\

dir/b/a-d >> %TEMP%\newfile
for /f "tokens=* delims= " %%a in ('dir/s/b/ad') do (
pushd %%a
echo ============================= >> %TEMP%\newfile
echo !CD! >> %TEMP%\newfile
for /f "tokens=* delims= " %%f in ('dir/b/a-d') do (
echo %%f %%~Tf >> %TEMP%\newfile

copy %TEMP%\newfile my.txt > nul

If at first you don't succeed, you're about average.


Report •

July 8, 2009 at 01:24:21
@OP ,
you can see here for example of traversing subfolders.
To display date modified, you can see here.

GNU win32 packages | Gawk

Report •

Related Solutions

Ask Question