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.

How to make check files exist on partition from cmd?

Featured Replies

I have a few partitions and i wanna to know is it possible cmd to check them for files exist. The target is simple - if partition is empty, after the check cmd script to relocate program files and documents and settings, or if partition is full to check next partition while find a empty partition? How i can check files exist on partition from cmd? Is it possible to integrate if exist similar script in to cmd script wich i can relocate program files and documents and settings directories to other partition?

You would probably need to check for files or directories not assigned system attributes on mounted fixed drives.

Notice that I said fixed, the last thing you'd want is for a removable device to accidentally get filled with data.

I would therefore suggest that you require a batch file which uses cscript or a fully fledged vbscript.

Untested.cmd

@Echo off&Setlocal enableextensions
>"%Temp%\_$.vbs" (Echo strComputer = "."
Echo Set objWMIService = GetObject("winmgmts:" _
Echo ^& "{impersonationLevel=impersonate}!\\" ^& strComputer ^&^
"\root\cimv2"^)
Echo Set colDrives = objWMIService.ExecQuery _
Echo ("Select * from Win32_LogicalDisk where DriveType = '3'"^)
Echo For Each objDrive in colDrives
Echo wsh.echo objDrive.DeviceID
Echo Next)
For /f %%a In ('cscript //nologo "%Temp%\_$.vbs"') Do Call :C_ %%a
Del "%Temp%\_$.vbs"
Goto :Eof
:C_
Dir/b/a-ds %1\ >Nul 2>&1&&(Goto :Eof)
If Defined _ (Goto :Eof) Else (Set _=T)
Echo REM Code goes below here for empty drive [%1] found

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

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.