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

  • SEARCH
  • Home
  • 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 8207595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:03:06+00:00 2026-06-07T09:03:06+00:00

I need to find in a specific folder if there exist a file with

  • 0

I need to find in a specific folder if there exist a file with zero bytes having the extension *.ff0. The following script is not working since I always get the message “file is non-empty”. What is wrong?

@echo off
set out="C:\test_files\*.ff0"

if "%out%" == "" ( 
  echo File does not exist.
) else if "%out%" == "0" (
   echo File is empty.
) else (
   echo File is non-empty.
) 

The second question is that my batch file will be located later on somewhere in an intranet folder, meaning that other people might possibly also have access.
Therefore, what should be the full code so as to do the following :

1-Identify if there is an open instance of the file.
2-If there is, warn the user that someone is already using it and, as soon as it closes, other users may open it

  • 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-07T09:03:07+00:00Added an answer on June 7, 2026 at 9:03 am

    Best to do it like this:

    @echo off
    for %%a in (c:\test_files\*.ff0) do (
      if %%~za equ 0 (
        echo %%~na is empty
      ) else (
        echo %%~na is not empty
      )
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to find a way how to create files from specific folder in
How can i find a file that stored in specific folder in a hard
I need to find all files with specific filename(for example main.css) in folder and
i have a big solution containing that much projects..i need to find a specific
I need to find the columns in a specific table, which is no problem:
I need to find using PL/SQL if a specific sequence named e.g. MY_SEQ exits.
I need to index specific strings with other strings and I can't really find
I'm trying to find a way with a batch file that will delete specific
Need to find the timestamp for the first minute of the first day of
I need to find a way to spin off a thread from a static

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.