If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > batch file to output dir info to txt file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-04, 15:59
alexis200487 alexis200487 is offline
Registered User
 
Join Date: Feb 2004
Location: New York
Posts: 45
batch file to output dir info to txt file

Hello,
I'm trying to write a bat file which will
go to specific dir ,
read specif.files with dbf, cdx, idx as well as its timestamp,
write dir info to txt file

I have this so far...

@echo off
echo --------------------------------------------------
echo List Dir
echo --------------------------------------------------
rem read from C all with dbf, cdx, idx
dir C:\NEW_REPORTS /tc/on
echo
if not exist D:\NEW_REPORT\DirList mkdir D:\NEW_REPORT\DirList
if not exist D:\NEW_REPORT\DirList\DirList.txt > dir D:\NEW_REPORT\DirList\DirList.txt
echo
echo --------------------------------------------------
DIR C:\NEW_REPORT\ > D:\NEW_REPORT\DirList\DirList.txt
rem read C and write it to D
DIR C:\NEW_REPORT\ >> DIR D:\NEW_REPORT\DirList\DirList.txt
echo
echo
echo --------------------------------------------------
echo - Done! Check status information -
echo --------------------------------------------------
pause


Thank oyu.

Alexis
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On