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.
My 5090 FE fans were being weird, speeding up and slowing down creating some noise, even after reboot. Updated to these drivers and did this undervolt https://www.reddit.com/r/nvidi..._better_than_stock_at_450w/ (but then to 2800MHz) and it has been fine since.
And of course that battery is the thing I'll need to replace sooner or later. It's starting to act a little flaky in its charge meter and that glue is just annoying to deal with. No need for it to be glued in place.
I'll say you are 50% correct. On the content side, yes, YouTube's content is basically free. Some might point out that they share ad revenue with creators, but I'll side with you saying that doesn't count. If the ad isn't viewed, the creator gets nothing from YouTube, so viewing the content is net-zero for everyone, not net-negative.
The other half of the equation is the platform costs. Both YouTube and Netflix have a cost to provide their service. Netflix bakes the cost into their plans, which can be plainly seen by the different resolutions offered at different tiers, which is a pure platform cost. As you pointed out, YouTube doesn't pay licensing fees, so their entire cost structure is the platform. Using that platform without watching the ads (or paying for premium) is not net-zero like above, in this case it is net-negative. You consumed resources on YouTube systems that YouTube very clearly is not offering for free, they expect compensation in the form of viewing ads or paying for premium.
TLDR, the company offering the service sets the price, either in currency or ad viewing. As the consumer, you can choose to make that agreement or not. Consuming the service without paying the price is not being offered.
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