Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Re-Mapping File Shares

Options
  • 23-01-2004 2:36pm
    #1
    Registered Users Posts: 3,640 ✭✭✭


    Is there any way a script can interogate the server name in a Mapped Network Drive, find a particular name and then rename it to a different server.

    ie.

    \\server1\share
    renamed to:
    \\server2\share

    I was told this may be done through kix scripting?
    Any ideas?


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,796 Mod ✭✭✭✭Capt'n Midnight


    If you are running NT / 2K /XP

    Start - Run - CMD
    type the word SET to see your settings

    you should have username computername logonserver etc

    you can then share folders for users use a $ to keep it tidy hidden (only from windows) shares.

    net use \\servername\%username%$
    net use "\\servername\%username%$" - if the username has a space in it.


    If you are using 95/98 there are utils to put the username etc into enviroment variables.

    ============================

    you could parse the output of NET USE
    use find to ID the server or use FOR to read in the third variable (or fifth if you use \ as a delimiter)

    Kix would probably do it too


Advertisement