Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8915237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:55:47+00:00 2026-06-15T04:55:47+00:00

Should be pretty easy right.. I am battling this. Or rather it battles me.

  • 0

Should be pretty easy right.. I am battling this. Or rather it battles me. So I do:

     net use w: /delete


     SET SERVER1=myserver
     SET ROOT_DRIVE=c$

     SET WEB_ROOT=\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\
     SET DESTINATION_FOLDER=PPA20_TEST


     net use w: \\%SERVER1%\%ROOT_DRIVE% /User:%usern% %password%  /persistent:yes 
     cd w:%WEB_ROOT%
     md %DESTINATION_FOLDER%

So supposedly this should create my DESTINATION_FOLDER inside WEB_ROOT folder under the mapped drive. Instead it creates it where that batch file is called from..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:55:48+00:00Added an answer on June 15, 2026 at 4:55 am

    It’s because it doesn’t change the active drive, it merely changes the active directory on the drive W:.

    To change both the active drive and the active directory, use the /D switch:

    cd /d w:%WEB_ROOT%
    

    However, you may not really need to set the w:%WEB_ROOT% directory active. Just specify the full path in the md command:

    md w:%WEB_ROOT%%DESTINATION_FOLDER%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be pretty easy but I'm having a heck of a time doing
This one should be pretty easy for an experienced programmer to answer. I've got
Possible Duplicate: Clone + Rename file with PHP This should be pretty easy. I
So this should be pretty easy, yet I can't get it work. I have
I need some with help with PowerShell, please. It should be pretty easy: I
This should be pretty simple, still I can not see what/how something could be
This should be pretty straightforward I would think. I have this string: [quote=Joe Johnson|1]Hi![/quote]
This should be pretty simple, but I am new at LINQ. I have a
This feels like it should be pretty simple, but not much seems to be
This seems like it should be pretty straight forward, but I'm apparently confused. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.