vbs script to list files in a directory and email results

Hi.

Been trying to write something with out any luck.   Im looking for a
script that will look in a given directory (i.e. c:\mydata) and e-mail
details of what files are in that directory, the details needed are
file names, date modified and size.

Anyone got any sample scripts ?

Thanks
0
systemtek
5/21/2010 3:10:21 PM
scripting.vbscript 564 articles. 0 followers. Follow

1 Replies
1061 Views

Similar Articles

[PageSpeed] 39


"systemtek" <duncan@systemtek.co.uk> wrote in message 
news:8c076e3d-9231-452b-8700-fd6227eb9bc8@y12g2000vbg.googlegroups.com...
> Hi.
>
> Been trying to write something with out any luck.   Im looking for a
> script that will look in a given directory (i.e. c:\mydata) and e-mail
> details of what files are in that directory, the details needed are
> file names, date modified and size.
>
> Anyone got any sample scripts ?
>
> Thanks

Let's have a look at what you've go so far. Alternatively, if you are not 
familiar with VB Scripts, consider using this batch file:
@echo off
dir "c:\MyData" > c:\Dir.txt
blat c:\Dir.txt . . .

You can download blat.exe from a number of sites. 

0
Pegasus
5/21/2010 9:14:44 PM
Reply:

Similar Artilces:

Attachments dont arrive to the addressee and the and when I get attach files they go to the body message.
Hello, I use Outlook XP and I have two problems. When I attach ome file it goes to the body message instead of going outside. Second, when I send a message it arrives to the adressee without the attachement. Any ideas of how can I solve this problems? Thanks, Joao Joao <umatur@inforcavado.com> wrote: > I use Outlook XP and I have two problems. When I attach ome file it > goes to the body message instead of going outside. Second, when I > send a message it arrives to the adressee without the attachement. > Any ideas of how can I solve this problems? These are both m...

SQL script to remove all transactional data in a database
I am looking for a SQL script to remove all transactional data in a database. I am going to be copying a database and need to remove all GL and sub ledger transaction data, but leave all accounts, vendors, customers, etc. intact. I suppose I can go through Maintenance > Clear Data > Series… etc. however this seems like a lengthy task and I am not entirely sure how to decipher what data would need to be 'cleared' to remove only the transactional data. ...

Formatting Help
Team - I really need a suggestion. I am importing the following query result into an excel sheet (that is the media the customer wants). Below is sample of what is occurring - I can not find how to format PaidAmtRangeInDollars so I don't have to move several ranges into the correct place. In the below Current Result I would have to cut and past 500 - 1000 below the 0-500. I have several of these requests and just can not accomplish this by the deadline. Current Result SV Session MTH PaidAmtRangeInDollars Widgets CH 1 092009 0 - 500 ...

any way to open multi html fiels in differen ie7 tabs from batch file?
I managed to open in single tab with last file shown while the others in history I also managed to get multi instance of ie7 I also can open one at a time but wait for ie7 to close I search the web, no luck so far. the Firefox way is definitely not supported. help would be much appreciated. platform ie7 on vista 64 "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message news:OQtrdi43KHA.348@TK2MSFTNGP04.phx.gbl... > I managed to open in single tab with last file shown while the others in > history > I also managed to get multi...

Providing files to other applications
Hello, We need to provide files to other applications. To simplify the case, we have some background data storage (databases etc.) which contains files. Users can up- and download files through our .NET application. Now we want to give them the ability to open those files directly from inside our application (like if you click on mail-attachments in outlook), but we want to be able to write back the changes when the user modifies and saves the file in the application. We thought about the following ideas: - Writing out a temporary file, and watch it for changes (this seems to be ...

Summarising lists by removing empty entries
I have a table in Excel of contracts of yearly revenues: 2002 2003 A 10 10 B 0 7 C 0 0 D 5 0 and I want to be able to create a summarised version, where the zeros are stripped out: 2002 A 10 D 5 2003 A 10 B 7 Sounds like there should be a vlookup-esque function for this... any ideas? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ "andi" <andi.vg6nz@excelforum-nospam.com> wrote in message news:andi.vg6nz@excelforum-...

incoming emails
Our emails come in through one server, then they are transferred via MS Exchange Server to our second branch - trouble is our server connections are down and I want to redirect all incoming emails to my own address so I can then print them out and fax them to our second branch until the connection is back on line - any ideas please ...

IE 7 Won't Export a .csv File...
I access a website that gives me the option to export a report to a csv file. Clicking on the link brings up a dialog box asking me to confirm my choice of using excel - I click OK and, the box goes away and the request just dies - excel does not launch. I have disabled pop up blocking so that should not be an issue. This always worked in FireFox 2 and never in in IE7. It does not work in Firefox 3. Any ideas? Thanks, Lou ...

Replacement of Event Scripts going from 5.5 to 2003
What is the best replacement for 5.5 Event Scripts when moving to Exchange 2k3 ...

Distribution list recepients should not see who's on the list
All, I have to create an email address (let's call it distributionlist@xyz.com) that will, once an email is received, redirect the content of that message to 10 recipients in 5 different companies (on 5 domains). We want the users to be able to hit "Reply All" and to respond to the email by sending a note to distributionlist@xyz.com (Therefore, everyone will get the message) The requirement is that once the recipient receives an email he should not see who's on the distribution list, therefore all what he should be able to see is from: distributionlist@xyz.com and To: dist...

Index and Match with Listed Items???
I am trying to offer a list of countries my buyers can get quotes from, then use the resulting country called out to pull an exchange rate from a table. I think the Index and Match function will work well, but I keep getting #N/A errors on the following formula =INDEX('Exchange Rates'!A2:B8,MATCH(C2,'Exchange Rates'!A2:B8,0),2 Exchange Rates is the tab I have the rates table on, (first column is Countries, second is exchange rate), and C2 is the cell in the input tab that has the list of possible countries to obtain quotes from. What I want to see as a result of the formula i...

Outlook and msg file ...
Hello, After a long research without answers ... When you send a mail with an attached file(test.txt, for example) and that the address is wrong, you receive a mail in return. This mail has an attached file(test.msg) which contains the mail that you sent. In this attached file(test.msg), there is your attached file(test.txt) How to recover the name of the attached file which is in the msg file ? I will use VB or VBA to reach this. Sorry for my poor English Thank you for your answers Jacques <jac_be@hotmail.com> wrote: > When you send a mail with an attached file(test.txt, for exa...

M4A File
Hi some of my music files will not play in Windows Media Player a box says it cannot find or play the m4a file, what do i need to do to be able to play these files ? Thanks . -- nski iTunes "normski" <normski@discussions.microsoft.com> wrote in message news:0D11E9D4-6A01-488A-A1B4-A36921160A89@microsoft.com... > > Hi some of my music files will not play in Windows Media Player a box > says > it cannot find or play the m4a file, what do i need to do to be able to > play > these files ? > > Thanks . > -- > nski ...

AutoReply from a Distribution List
I have read a post in here but it did not answer that persons question nor mine. I have set up a distribution list called resumes@comany.com I set up a user autoreplyemail with an Exchange Account so that I can add all the autoreply rules I might create in this account. In the autoreplyemail Outlook profile I created a Rule so that when a message arrives to the resumes@company.com email it will have the server reply with a message (click on message and I created the subject and body of the email , left the To line Blank ). On the Exchange 2003 Server SP2 ( W2K3 Server ) , the allow Ou...

Scripting mailbox creation
How can I script the creation of an exchange mailbox for and exsisting user? Thanks Mark Why do we need to script when we can just right, Exchange Tasks, create mailbox? -- Nicholas Basile(MSFT) nicbas@online.microsoft.com Microsoft PSS Please do not send email directly to this alias is for newsgroup purposes only!. This posting is provided "AS IS" with no warranties, and confers no rights. "Mark" <anonymous@discussions.microsoft.com> wrote in message news:97a001c433a8$cad2ee40$a601280a@phx.gbl... > How can I script the creation of an exchange mailbox for &...

address book in outlook 6 can you have two contact lists
I am trying to have two contact lists one for business and one personal. is this possable? When an E-mail comes in I would like to decide where I would like to put the address. I did have this on an older computer/operating system it was windows 98. I now have windows XP and I can notseem to do/find how to do this. >-----Original Message----- >I am trying to have two contact lists one for business and one personal. is=20 >this possable? When an E-mail comes in I would like to decide where I would=20 >like to put the address. I did have this on an older computer/operating=2...

OWA sends message as HTML script
Hello OWA has been sending an HTML script with all the coding for an individual who recieves and sends message. No other user has this issue, except him. Everything is normal when drafting the message. The messages do not show up as HTML code until after recieved or sent. We are using Exchange 2003. The client browser is IE 6.0 SP1, and OS is 2000 Pro. What could have caused this, and what can we do to fix this. I appreciate the assistance in advanced. Thank <script></script><META http-equiv="Content-Type" content="text/html; charset=utf-8"><H...

How do I import .dbx mail files
I had Outlook Express on old PC before it was sold and all my files were saved as .dbx files onto CD-Rom now I have new laptop with Microsoft Office Outlook 2003 but it only accepts .pst files! It won't accept my .dbx files :( I've so much valuable info etc and I am soooooo mad that I can't access them... I've tried copying them into the e-mail files - importing them via the wizard - but nothing works... Can anyone help? Don't panic - this is not a problem! You need to first import your files into Outlook Express on your new PC (it comes with Internet Explorer)....

Can't find file when it's right there?
When I double-click on a spreadsheet in Windows Explorer, Excel comes up, and an error message saying it can't find the file. From excel, I can do a file open, and it opens the file fine. It just started doing this all of a sudden today. Any suggestions? Try this Tools>Options>General uncheck "Ignore other Applications" Exit Excel and try again If this doesn't work try to re-register Excel On the Windows Taskbar Close Excel Start>Run "excel.exe /regserver"(no quotes)>OK. See the space between exe and /regserver You might have to designate a ful...

QFX File Imports
I'm currently using Money 2004 Standard. Can I import QFX files with this version? I'm wondering, because when I try to import a QFX file nothing happens. Below is the beginning part of the QFX file. Any help would be great. Thanks. /Mike OFXHEADER: 100 DATA: OFXSGML VERSION: 102 SECURITY: NONE ENCODING: USASCII CHARSET: 1252 COMPRESSION: NONE OLDFILEUID: NONE NEWFILEUID: NONE In microsoft.public.money, Michael Biel wrote: >I'm currently using Money 2004 Standard. Can I import QFX files with this >version? I'm wondering, because when I try to impo...

Select all or clear all in a list box
How do I select al or clear all in a list box using vba? -- Jim Assuming you want the code behind a button, the following code will work. Note: this button should have a default caption of "Select All". It will then work as both a Select and UnSelect button. '------------------------- Private Sub cmdSelectAll_Click() On Error GoTo Err_cmdSelectAll_Click Dim i As Integer If cmdSelectAll.Caption = "Select All" Then For i = 0 To lstAnswerCat.ListCount - 1 lstAnswerCat.Selected(i) = True Next i cmdSelectAll.Caption = "Unselect All" E...

Selecting a series of file but the last one becomes the first
Hi ! When I select a series of files in a dialog, eg I do multi-upload to YouTube, the last file in the series becomes the first. How come ? Occasionally, it's correct. It's not only for Youtube. Everywhere else, it's the same, eg copy files from explorer to another. How to make the first file first ? Thanks. Because the listing you see isn't necessarily the order that they are found on the hard drive. csc_at_youtube_0001@yahoo.com.sg wrote: > Hi ! > > When I select a series of files in a dialog, eg I do multi-upload > to YouTub...

SMART LIST #3
We frequently export smartlist output to Excel. Some of the reports are very large and it would be more efficient to export it as a text file. However when we do that, if there are very many columns, the text wraps and it makes it almost impossible to extract the data into excel. Is there any way to turn of the text wrap in smartlist? Try the EZ-GP product from Data Presentation Products: http://www.datapresentation.com/products/index.cfm It's fast and free. It will download the smartlist information quickly. "RICK AT AUGUSTACOOP" wrote: > We frequently export smart...

TransferText to make batch file, need help
I need to create a batch file with ~6000 lines in it for ArcGIS. Python is beyond me, so I'm trying to do this with VBA in an Access module using hints I've found through this discussion group (VBA is what I know how to use). Each line should be: Intersect_analysis "C:\FICE93_25\strID.shp #;'C:\LSAY\Census\SHPs\1990\1990 Block Groups\BlkGrp90_Albers.shp' #" C:\FICE93_25\strID_Intersect.shp ALL # INPUT I've broken the line into 4 parts, strStart, strMid, strEnd & strID, using the code at the end of this message. The problem is, I get "Compile erro...

Writing graphics to a file
I have seen code to write a bitmap to a file after the graphics were created in an MFC window. What I would like to do is create graphics in a server application. So I need to be able to draw the graphics in memory, and then write them to a file. Is there a way to use the CreateDC function for this purpose? If so, could you point me to some specific example? Thanks, Miguel MCorazao wrote: > I have seen code to write a bitmap to a file after the graphics were created > in an MFC window. What I would like to do is create graphics in a server > application. So I need to be able t...