- 0
[MS-DOS Batch] Automatically determine if drive is already mapped
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By margrave · Posted
I have checked the scaling, and it is not different at all I reapplied my current theme and no thing changed. Fonts still too damn small and NO OPTION IN WINDOWS TO ADDRESS IT ANYMORE! Removing options for customization is NOT UPGRADING IN ANYWAY! -
By hellowalkman · Posted
after updates, it has improved. -
By cyberhash · Posted
Hopefully this will turn out to be the same/better than the old LOTR BFME series. Been nothing decent on the RTS scene for a long time now. Anything that does come out tends to be pretty mediocre. A new C&C Generals series would sell well -
By yw71 · Posted
It make sense only if they want to hide the minority of changes of each new version -
By News Staff · Posted
Trade up with Sterling Stock Picker now price dropped by 85% by Steven Parker Today's highlighted deal comes via our Apps + Software section of the Neowin Deals store, where you can save 85% off on a lifetime subscription to Sterling Stock Picker. Sterling Stock Picker (SSP) is an award-winning platform designed to make stock investing accessible to everyone, regardless of expertise. The software offers multiple methods to identify winning stocks that align with your personal values, investment preferences, and risk tolerance. By handling all the complex calculations, it allows you to focus on making informed investment decisions. The patent-pending North Star technology provides clear guidance on whether to buy, sell, hold, or avoid a particular stock. Ask Finley, your personal AI financial coach Finley is your personal AI financial coach providing real-time data access, strategic investment advice, risk assessment, and educational support to help you make informed decisions. Whether you're a seasoned investor or just starting, Finley is equipped to help you achieve your financial goals. Feel free to ask any questions about your portfolio or the stock market. PERSONALIZED FINANCIAL GUIDANCE Custom Recommendations: Get stock picks tailored to your risk tolerance, portfolio performance, and investment goals. Dynamic Insights: Access detailed financial, technical, earnings, growth, and risk analysis for smarter investing. ENHANCED PORTFOLIO MANAGEMENT Done-For-You Portfolio Builder: Easily construct a diversified portfolio based on your risk tolerance and investment goals. Analysis and Suggestions: Receive data-driven portfolio adjustments to optimize returns based on your risk acceptance score. Risk Assessment Overview: Understand your risk level and receive stock recommendations aligned with your investment strategy. STRATEGIC INVESTMENT ADVICE Stock Rockets: Discover top-performing companies with over 50% quarterly revenue growth and the highest North Star rankings. Concentrated Portfolio Strategy: Focus on high-potential stocks instead of broad diversification to maximize growth. Industry and Sector Insights: Stay ahead with detailed performance narratives and sector-specific trends. EDUCATIONAL SUPPORT & COMMUNITY Verbose Explanations: Break down complex financial concepts with in-depth explanations for beginners. Investment Strategies: Learn and apply various investment strategies with expert-backed insights. Community Chat Forum: Connect with fellow investors to share insights, ask questions, and discuss investment strategies. Build your Stock Portfolio in 3 easy steps! Discover Your Risk Tolerance: Take a quick 5-minute questionnaire to assess your ability to handle risk effortlessly. Search Stocks Aligned With Your Personal Values: Use an intuitive stock-picking interface to confidently find winning stocks. Build Your Portfolio: Utilize the Done-For-You Portfolio Builder to simplify investing and remove the guesswork. Good to know: Length of access: lifetime Redemption deadline: redeem your code within 30 days of purchase Access options: desktop or mobile Only available to new users Updates included A lifetime subscription to Sterling Stock Picker normally has a suggested price of $486, but you can pick it up for just $68.99 for a limited time - that represents a saving of $417 (85% off). For a full description, specs, and license info, click the link below. Sterling Stock Picker lifetime subscription for $68.99 (was $486) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
-
-
Recent Achievements
-
abortretryfail earned a badge
Week One Done
-
Mr bot earned a badge
First Post
-
Bkl211 earned a badge
First Post
-
Mido gaber earned a badge
One Year In
-
Vladimir Migunov earned a badge
One Year In
-
-
Popular Contributors
-
Tell a friend
Question
Xtreme $niper
I didn't know if I should start this topic under "Programming" but it seems to be the only place to put it.
I want to run a batch file that will automatically map a network drive before it continues the script. The problem I have is that if for some reason the drive is already mapped, or the batch file has been run twice in one session, the "net use" command returns an error. The script still works in the end, but I would like to bypass the "net use" command altogether if the drive is already mapped.
I've been digging through the net trying to find anything that can help me out, but to no avail. The closest thing I can find is just typing "net use" can tell you if the drive is already mapped or not, but I can't take any one piece of that result and use it in my script.
Does anyone have any suggestions? My purpose here is to write an IF statement that determines:
IF drive X: is already mapped, then skip net use command and proceed with the remainder of the script.
ELSE, run net use command and proceed with the remainder of the script.
I figured ERRORLEVEL could come in handy, but that only works after I get the error that I'm trying to avoid in the first place.
Thanks!
Link to comment
https://www.neowin.net/forum/topic/616815-ms-dos-batch-automatically-determine-if-drive-is-already-mapped/Share on other sites
19 answers to this question
Recommended Posts