Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Windows file names are case insensitive, so that simplifies things a bit. But <code>cmd.exe</code> (batch) does not have very sophisticated directory listing capabilities. You would probably be better off with something like PowerShell, but I don't know that scripting language very well.</p> <p>Or better yet, use the free <a href="http://gnuwin32.sourceforge.net/packages/findutils.htm" rel="nofollow">gnu find for Windows</a> utility as per Endoro's suggestion in the comment.</p> <p>But if you want to restrict yourself to native <code>cmd.exe</code> (batch) commmands, then below are some options:</p> <p>The following command will work on the command line. It will give the absolute paths, but it will not work properly with files whose size exceeds ~2 gigabytes because <code>cmd.exe</code> numbers are limited to signed 32 bit integers. Numbers greater than the maximum will be compared using string semantics instead of numeric, thus giving the wrong result. File sizes are always in bytes, so I've adjusted the size accordingly:</p> <pre><code>(for /r %F in (*.z3d) do @if %~zF geq 512000 echo %F) &gt;list_Z3D.txt </code></pre> <p>Percents must be doubled to use within a batch file</p> <pre><code>@echo off (for /r %%F in (*.z3d) do if %%~zF geq 512000 echo %%F) &gt;list_Z3D.txt </code></pre> <p>Relative paths can be gotten with FORFILES, but it is comparatively slow. This command will work both in command line and batch file. It also will not work properly with files that exceed ~2 gigabytes.</p> <pre><code>forfiles /s /m *.z3d /c "cmd /c if @fsize geq 512000 echo @relpath" &gt;list_Z3D.txt </code></pre> <p>WMIC can accurately screen by file size, regardless of the size. But it is quite slow when working with directory trees. This provides the absolute paths.</p> <pre><code>@echo off setlocal disableDelayedExpansion set "ext=z3d" set "sz=512000" for %%F in ("%cd%") do ( set "drv=%%~dF" set "pth=%%~pnxF\%%" ) wmic datafile where "drive='%drv%' and path like '%pth:\=\\%' and filesize&gt;%sz% and extension='%ext%'" get name |more +1 &gt;list_Z3D.txt </code></pre> <p>Either of the first two solutions can be made to work with large file sizes with additional programming. The following support file sizes up to ~999 terabytes. These solutions will be faster than the WMIC solution.</p> <p>To accurately get absolute paths of files that are >= 512000 using a batch file:</p> <pre><code>@echo off setlocal disableDelayedExpansion &gt;list_Z3D.txt ( for /r %%F in (*.z3d) do ( set "sz=000000000000000%%~zF" set "file=%%F" setlocal enableDelayedExpansion if !sz:~-15! geq 000000000512000 echo !file! endlocal ) ) </code></pre> <p>To accurately get relative paths of files that are >= 512000 on the command line or in batch file:</p> <pre><code>forfiles /s /m *.z3d /c "cmd /v:on /c set sz=000000000000000@fsize&amp;if !sz:~-15! geq 000000000512000 echo @relpath" &gt;list_Z3D.txt </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload