+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, VBS open network folder in Coding and Web Development; Hey edugeek, its tooo early in the morning for me to see where im going wrong on this, We have ...
  1. #1

    Join Date
    Jul 2009
    Posts
    267
    Thank Post
    6
    Thanked 43 Times in 37 Posts
    Rep Power
    16

    VBS open network folder

    Hey edugeek, its tooo early in the morning for me to see where im going wrong on this,

    We have recently changed the students home drives to \\server4\studentname$

    However my old VBS script to open students folders was pointing to \\server4\students$\studentname


    Can anybody help me change my vbs script?
    thanks!

    p.s. i have tried "& fname$ but it didnt like it



    Dim fname
    fname=InputBox("Enter students username FOR EXAMPLE 09smith:")
    MsgBox("You typed " & fname)
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "%windir%\explorer \\server4\students$\"& fname

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by andydis View Post
    Hey edugeek, its tooo early in the morning for me to see where im going wrong on this,

    We have recently changed the students home drives to \\server4\studentname$

    However my old VBS script to open students folders was pointing to \\server4\students$\studentname


    Can anybody help me change my vbs script?
    thanks!

    p.s. i have tried "& fname$ but it didnt like it
    Try:

    Code:
    Dim fname
    fname=InputBox("Enter students username FOR EXAMPLE 09smith:")
    MsgBox("You typed " & fname)
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "%windir%\explorer \\server4\" & fname & "$"
    Not sure if that will do it, but worth a shot

    Steve

  3. #3

    Join Date
    Jul 2009
    Posts
    267
    Thank Post
    6
    Thanked 43 Times in 37 Posts
    Rep Power
    16
    lol thanks steve21 :-) having one of those braindead mornings :-(

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 4
    Last Post: 18th November 2011, 03:36 PM
  2. Open a folder, then search subfolders
    By timbo343 in forum Scripts
    Replies: 0
    Last Post: 6th November 2008, 04:43 PM
  3. Viewing network folders
    By alonebfg in forum Windows
    Replies: 2
    Last Post: 2nd July 2007, 07:28 AM
  4. Open each folder in the same window
    By mark in forum Windows
    Replies: 2
    Last Post: 30th May 2007, 01:09 PM
  5. Open Network Management System.
    By Dos_Box in forum Downloads
    Replies: 2
    Last Post: 30th January 2006, 09:24 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •