Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Want to find a folder through DOS

Featured Replies

ok what i need to do is to find a certain folder in all drives so that I could set it as variable... like

set INSTALL=D:\Installer

but I don't know how to find it or set it, if that Folder does not exist on that drive..., just for curiosity also to install apps easily...

@ECHO OFF & SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
FOR /F "TOKENS=1" %%# IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (
IF EXIST %%#INSTALLER SET "INSTALL=%%#Installer")
IF NOT DEFINED INSTALL GOTO :EOF
:: REST OF CODE BELOW HERE
::EXAMPLE COMMAND USING %INSTALL% VARIABLE
ECHO=[%INSTALL%]

  • Author

wow awesome way of using commands...

btw does :EOF works without using exit command for it??

what "TOKENS=1" stands for??

Thanks for your batch :D

does :EOF works without using exit command for it??

Yes!

what "TOKENS=1" stands for??

TBH, it's not needed, I just failed to remove it from the code I copy/pasted it off!

@ECHO OFF & SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
FOR /F %%# IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (
IF EXIST %%#INSTALLER SET "INSTALL=%%#Installer")
IF NOT DEFINED INSTALL GOTO :EOF
:: REST OF CODE BELOW HERE
::EXAMPLE COMMAND USING %INSTALL% VARIABLE
ECHO=[%INSTALL%]

Here is how you would do it using VBS scripting.


Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Drv, Loc
'-> Search All Drives For Installer Folder
For Each Drv In Fso.Drives
If Fso.FolderExists(Drv & "\Installer") Then Loc = Drv & "\Installer"
Next
'-> Check The Resuts Of Searching The Drives
If Len(Loc) > 2 Then
MsgBox Loc,4128,"Confirm Folder"
Else
MsgBox "Can Not Find The Installer Folder",4128,"Missing Folder"
End If

  • Author

@jaclaz

well I got used to call it DOS :D, since it was originally called DOS program but thanks for correcting...

well thanks guys!!! hope that I can study programming also xD

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.