Help with writing a script 09-25-10

I need to know how to create a vbscript using notepad ++ that will do the 
following: ·         Prompt the user for a folder name & a file name
·         If the folder does not exist, create the folder & the file.  Let 
the user know that the folder & the file have been created. 

·         If the folder does exist but the file does not, create the file.  
Let the user know the file has been created. 

·         If the both the folder & the file exist, print the following info 
about the file: when the file was created, when the file was accessed last 
time, when the file was modified last time. 

Repeat the operation above until the user enters “0” as the folder name.  
Print the number of iterations that have been performed. I am very new to 
vbscripting anything would be of great help. Thanks
0
Utf
9/25/2010 8:09:03 PM
scripting.vbscript 564 articles. 0 followers. Follow

1 Replies
921 Views

Similar Articles

[PageSpeed] 52


"basic beginner" <basicbeginner@discussions.microsoft.com> wrote in message 
news:7D876BDA-DBDB-4571-97C7-A38FF0CAFC9F@microsoft.com...
> I need to know how to create a vbscript using notepad ++ that will do the
> following: ·         Prompt the user for a folder name & a file name
> ·         If the folder does not exist, create the folder & the file.  Let
> the user know that the folder & the file have been created.
>
> ·         If the folder does exist but the file does not, create the file.
> Let the user know the file has been created.
>
> ·         If the both the folder & the file exist, print the following 
> info
> about the file: when the file was created, when the file was accessed last
> time, when the file was modified last time.
>
> Repeat the operation above until the user enters “0” as the folder name.
> Print the number of iterations that have been performed. I am very new to
> vbscripting anything would be of great help. Thanks

Download the VB Script help file script56.chm from the Microsoft site, then 
look at the examples for the following functions and objects. After you've 
played with them for a couple of hours they will become fairly easy to use. 
Post again if you get stuck.

- inputbox (to prompt the user for a folder/file name
- FolderExists (a File System Object method)
- FileExists (a File System object method)
- Numerous other methods within the File System object
 

0
Pegasus
9/25/2010 10:26:32 PM
Reply:

Similar Artilces:

HELP Unhide Column A
I have tried to select entire sheet, and adjust columns. I have tried the"go to" select A1 and unhide, BUT column A will not show up.. The sheet is not protected. One possibility is that you moved column A off screen and applied Freeze Panes. If so then remove the freeze panes. -- HTH... Jim Thomlinson "Donna" wrote: > I have tried to select entire sheet, and adjust columns. I have tried the"go > to" select A1 and unhide, BUT column A will not show up.. The sheet is not > protected. try moving putting your cursor on the line ne...

hyperlinks 02-20-10
I can no longer open hyperlinks in my emails due to "restrictions in effect on this computer - see your system administrator. hobo, you wrote on Sat, 20 Feb 2010 08:20:01 -0800: > I can no longer open hyperlinks in my emails due to "restrictions in effect > on this computer - see your system administrator. http://www.slipstick.com/problems/link_restrict.htm -- Best Regards Christian Goeller MVP - MS Outlook http://www.outlookfaq.net See the following. It is an issue with IE and not with Outlook http://www.slipstick.com/problems/link_restrict.htm --...

HELP!! NESTING FUNCTION
What do I do to this argument below if when d47 is negative but c47 is positive, how can I add it so that if this is the case........ take g47/d47 Here is what i wrote with error =3DIF(AND(C47<0,D47<0),ABS(G47/D47),IF((C47<0),G47/C47+1,G47/D47),IF((,D47<= 0)=AD, G47/D47+1,G47/D47)) On 30 Jan 2006 05:50:38 -0800, "bullandbear1987" <bullandbear1987@gmail.com> wrote: > What do I do to this argument below if when d47 is negative but c47 is > > positive, how can I add it so that if this is the case........ take > g47/d47 > > >Here is what...

NEED HELP including mileage in invoice ...
i purchased MICROSOFT MONEY 2003 DELUXE AND BUSINESS. NOw, how do I include my mileage in the invoice that I must create in order to be paid from clients. I am self- employed and this information must be entered. I cannot seem to figure out how to do that and the HELP available with the software is NO help! TIA for your assist ... Asking multiple times does not make people who might know the answer more likely to offer to help you. Just the opposite. As for me, I don't use D&B and do **not** answer email requests. "Natalie" <loonsng@aol.com> wrote in message...

Help with Receipt xml <CONDITION> statement
Hi All, Has anyone used a conditional statement in a receipt to print different comments based on a value in one of the custom text fields. For example I have the CustomText1 field configured in customers and populated with a value to allow customers to be grouped (such as say Retail and Wholesale customers). I wish to print different messages on the receipts based on which group the customer belongs to. I am trying to use the following syntax to determine which message I should print - <CONDITION> Customer.CustomText1 = "Retail" </CONDITION> The expression always se...

Letter Writing Assistant #2
I have MS Office 2003 on my workstation and GP 8.0. Letter Writing Assistant is giving me an error that says, "Microsoft Word must be installed on this machine to use the Letter Writing Assistant." Is there any way to get LWA to recognize that I do have Word installed? Thanks for any help, Kurt ...

dowloading statements over-writes check number
I'm using checks with 5 digit check numbers... money is downloading information and over-writing the check numbers - who's fool idea was that anyway? - so I have probably 100 'check 2410's in my file... I want the system to automatically match transactions when I download my statements, but i don't want it to over-write the check number! How do i stop this? Probably the bank's. But you also elected to accept that their data would be better than garbage when you decided that downloading transaction data was the way to go. "bigjohn" <bigjohn@discuss...

Write record from Form to new row in spreadsheet
Not sure if my first one went through okay. I am using a form to provide input into a spreadsheet. Every time I write a record, I want it to write to a new line in the spreadsheet. When I first used this code, it wrote on the second line in the spreadsheet, even though there was a second header line there and it overwrote the line. When I took out the first header, it wrote on the second line okay. However, when I tried to enter a new record, it overwrote the first record. Basically I want to write the first new record on the third line (after two header lines) and then each...

How to use C# to write an xml document to MemoryStream, not a file?
I'm using XmlTextWriter now, but it seems it can just be used to create a xml file, how can I do? Thanks in advance! Jackfan Jackfan wrote: > I'm using XmlTextWriter now, but it seems it can just be used to create a > xml file, how can I do? MemoryStream ms = new MemoryStream(); XmlWriter w = new XmlTextWriter(ms, Encoding.UTF8); w.WriteStartDocument(); w.WriteElementString("foo", "", "bar"); w.WriteEndDocument(); w.Close(); -- Oleg Tkachenko [XML MVP] http://blog...

Advantages and Disadvantages of Referencing An Add-In Workbook 03-22-10
Let me give you some background information first. I have a workbook (Quote Generator v3.xls) that references an add-in workbook (QG Add-In v3.xla). The Add-in workbook contains macros to manipulate data in the Quote workbook. So when the Quote workbook is opened the Add-In workbook is opened hidden from the user. I should also note that both of these files saved on a server, thus several sales people use them. Here is my question. When a user opens a Quote workbook the Add-In is automatically opened. If I need to make updates to the Add-In, because of a "bug" ...

windows explorer stopped working 04-19-10
Hi all, I got this problem in vista home premiun since I installed service pack 2. It happens when I click the right button of the mouse, I was told that it could be because I installed some application but I didn't find the culprit. Anyway, I want to execute command prompt as administrator and since I can not do it from the all start menu with a right click button, is there another way from a command line??. Actually I need to make some changes to HOSTS file and in order to do that I need to edit it as administrator. TIA On 4/19/2010 2:38 PM, Fanor P. wrote: > Hi...

Help! Lost secure channel
Hi, Yesterday after a routine reboot, the first Exchange server (there are two) lost it's secure channel with the domain. I can no longer logon with domain credentials, but still can logon locally. There are a couple of fatal schannel errors in the log and users cannot login to their accounts. I've tried using netdom to re-establish the secure channel and although it reports success, I still cannot logon and no mail flows. Does anybody have any ideas to resolve this? What would the implications be of rejoining this server to the domain? It will recreate it's SID, right? Will thi...

Who can help ??
Something in the list of choices in the special section; When you open the account register and a transaction there is a special section different from the income or expense sections. You find transfers to different accounts in the special section. My list of accounts indicates FTQ and the special section indicates FTQ (contributions) which is wrong. How can I change this ?? My Money version is 2006. Thanks "Dick Watson" <littlegreengecko@mind-enufalready-spring.com> a �crit dans le message de news: u3jquhVIGHA.140@TK2MSFTNGP12.phx.gbl... > We'd love to help, but your ...

Form Field Help line does not show
Hello, I have a medium-size template with a lot (several dozens) of form fields. Some have logical connection, so I'm using ActiveDocument.FormFields("SomeField").Select method to force jump to a specific field on the form. Sometimes this is done from the "exit" macro that does validations, and sometimes to skip some irrelevant fields. I've encountered two issues: 1. The help text in the status line will not show for the proper field in ..Select 2. I can't jump back to the same field. The workaround I found is: .Select a read-only previous fi...

Sending an email message from a batch vbs script
I need to create a vbscript to be scheduled as a batch job to send a specific file to a given recipient every night. Outlook is installed on the Windows XP Pc where the script should be scheduled, but no user interaction is available (the script should be scheduled to run during the night). What is the best method I should use to create and send the message? Is there any sample I can start from? Regards Marius "Marius - Roma" <mr@nospam.local> said this in news item news:#XS#mP5nKHA.4648@TK2MSFTNGP06.phx.gbl... > I need to create a vbscript to be sch...

Ripping Music 12-03-09
I have music CDs that will play but does not give the option to rip. On Thu, 3 Dec 2009 08:16:01 -0800, Scotlow <Scotlow@discussions.microsoft.com> wrote: >I have music CDs that will play but does not give the option to rip. There's a Rip tab in the top of the player. When you press that, what exactly happens ? Are you shown a list of tracks on the CD to Rip ? In media player, below the Rip tab, there's a small dropdown menu. Clicking that, choose More Options. You should see a "Rip Music" menu You might want to check "Rip Automatically" a...

Help me run a customer report
I need to know if there is a way to run a report so I may get a list of all customers that purchased products in one of our retail departments to send a flyer too in the future. There's a mailing list report in the Reports Library on Customer Source. -- Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond to me directly but post all responses here in the newsgroup so that all can share the information "misshettie" <misshettie@discussions.microsoft.com> wrote in message...

Please help with Time subtracting
I've tried evrything, this is what I need to do: A1 = time in B1 = time out C1 = difference in hours and minutes Now here is the hard part: I want to enter data for A1 and B1 eg. 1234 and have it display 12:34 but not have to use th ":" separator. I have C1 currently formatted for hh:mm with a formula of B1-A1 But I have to constanly hit "shift" ":" when entering data in cells A1, B1. I looked all over the web to no avail, I thought this was a really simple and common excel situation. Any help will be greatly appreciated. Thanks --- Message posted f...

Startup script to delete file
Hello, I'm afraid I'm not well versed in Windows Server, but I think what I want to do is very simple. I need to have the startup of Server 2003 delete a file that may or may not exist. And here is why - when the server is not shutdown correctly (e.g. power outage), the .pid file for our rsync service does not get deleted. So when the server starts up again, the rsync service does not start because the .pid file exists. So I'd like to have the file deleted on startup, just in case it is there. I've done a lot of research, but am getting very confuse...

Help! cleaning out inbox and saved emails
I have created in the past two years files in my inbox but want to delete them as they are taking up too much space. How do I transfer these email from my inbox file to a file(s) in Microsoft word. The only way I have found to date is to (Save AS) save each one individually to a word file but this is way too time consumming. Help please. Thanks so much BB Do they have to be in Word? You can create a folder on the Desktop and just drag the messages into it. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "BB" <BB@discussions.micr...

multiple email addresses #10
Using Office 2007 and Windows XP Several of the people in my contacts folder have more than one address. I have both a personal email and a work email, but they have the same display name. For example: John Doe - jdoe@personal.com and then John Doe - jdoe@work.com When I type John Doe in the recipient box of a new email, I'd like to see both email addresses listed so that I can choose which one I want to use for this particular email. However, it seems that the email address defaults to whichever was the last one I used. Any way I can see both address show up so I can choose??...

Help: what you see it (not) what you get
Dear MVP's Two questions: What color pallet is publisher 2003 using and more inportant: where can I find it to change on the disk. I have made several publications and every time the background color is not what I get back from the commercial printer services. We use settings in Pub like CMYK, European uncoated as distiller output (we have used addcom prepress from the forum), and NO pantome collorics. I know that some printerservices are making a mess out of it, but we tried several. It is NOT the pictures (they can be set at CMYK) but the use of color. We heve received Joboptions fro...

HELP! Drop Down missing information
I have a customer using an application that has a few drop down combo boxes. The main one is a drop down which is a search and displays 12 pieces of information :File Nbr, Customer, Date, Product, Masterbill, House Bill, Nbr Pieces . . . Suddenly this morning, the user clicks on the drop down, NONE of the customer information appears anymore! NOTHING has been changed with the application. When the user goes to Customer Maintenance, the drop down for it doesn't display either, although there are numerous records in the drop down, none of the info displays. However, just because ...

HELP: Incoming Internet mails delay by the SMTP Connector at Exchange 2003 frontend
We just switched over to Exchange 2003 SMTP frontend and we notice mails always get queued up for 5 to 20 minutes. Force Connection, unfreeze didn't help. I can use telnet to port 25 of the backends to send a message instantly without any delay. So why the mails always get delay by the connector? Thanks Anything configured in the delivery options tab of your connector? James Chong andyhwconnet@hotmail.com wrote: > We just switched over to Exchange 2003 SMTP frontend and we notice > mails always get queued up for 5 to 20 minutes. Force Connection, > unfreeze didn't hel...

Need Mailbox Manager Script
I need a script to run Exchange 2000 Mailbox Manager just one time per month, instead of the weekly or daily options built in to Mailbox Manager. Any ideas, or can someone point me to a pre-made script? I'm a very rank amateur when it comes to scripting, and I need to implement this ASAP! Thanks in advance! ...