Computing.Net > Forums > Programming > Batch or VBS Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch or VBS Help

Reply to Message Icon

Name: bigb
Date: July 7, 2009 at 04:34:52 Pacific
OS: Windows XP SP2
CPU/Ram: P4
Product: Dell / ?
Subcategory: General
Comment:

Hi

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.
Thanks
bigb



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 7, 2009 at 23:46:43 Pacific
Reply:

@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
)
popd
)
popd


copy %TEMP%\newfile my.txt > nul


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

M2


0

Response Number 2
Name: ghostdog
Date: July 8, 2009 at 01:24:21 Pacific
Reply:

@OP ,
you can see here for example of traversing subfolders.
To display date modified, you can see here.

GNU win32 packages | Gawk


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch or VBS Help

Batch or VBS help www.computing.net/answers/programming/batch-or-vbs-help/13071.html

Batch f or vbs; verify a registry k www.computing.net/answers/programming/batch-f-or-vbs-verify-a-registry-k/14916.html

vb help club www.computing.net/answers/programming/vb-help-club/9453.html