如何批量读取文件?

时间:2019-03-18 14:59:59

标签: batch-file

编辑:我刚刚在此行忘记了一个百分比:

for /f "eol=; tokens=2,3* delims=, " %i in (%cd%\JournalEntries\%filename4%.txt) do @echo %i %j %k

但是现在我遇到了一个新问题。运行时,循环不会显示 文件的内容,但只是字母j和k,假定是从@echo%i之后的位置开始。 输出:J K

:read2
echo All files are created in a MM-DD-YYYY format, meaning all files are read the same way.
echo Once the file opens, it will give you 30 seconds to read before resetting back to the next question.
timeout 5
set /p filename4= "What is the date of the file you would like to open (mm-dd-yyyy)?
for /f "eol=; tokens=2,3* delims=, " %i in (%cd%\JournalEntries\%filename4%.txt) do @echo %i %j %k

timeout 30

1 个答案:

答案 0 :(得分:0)

您在这部分是否没有双引号:

<div class="associated-product__swatches associated-images">
    <div class="associated-images__scroll scroll-up disabled">
        <i class="glyphicon glyphicon-chevron-up"></i>
    </div>

    <div class="hidden-xs associated-images__container product-alternate">
        <a href="#" class="not-no-image" title="S, Crystal" data-price="£209.95" data-saleprice="£104.98" data-colourid="2142" data-colourtitle="S, Crystal" data-productid="203142">
            <span data-hires="#">
                <img src="#" class="img-responsive">
            </span>
        </a>
    </div>

    <div class="hidden-xs associated-images__container product-alternate">
        <a href="#" class="not-no-image" title="S, Crystal" data-price="£209.95" data-saleprice="£104.98" data-colourid="2142" data-colourtitle="S, Crystal" data-productid="203142">
            <span data-hires="#">
                <img src="#" class="img-responsive">
            </span>
        </a>
    </div>

    <div class="hidden-xs associated-images__container product-alternate">
        <a href="#" class="not-no-image" title="S, Crystal" data-price="£209.95" data-saleprice="£104.98" data-colourid="2142" data-colourtitle="S, Crystal" data-productid="203142">
            <span data-hires="#">
                <img src="#" class="img-responsive">
            </span>
        </a>
    </div>

    <div class="hidden-xs associated-images__container product-alternate">
        <a href="#" class="not-no-image" title="S, Crystal" data-price="£209.95" data-saleprice="£104.98" data-colourid="2142" data-colourtitle="S, Crystal" data-productid="203142">
            <span data-hires="#">
                <img src="#" class="img-responsive">
            </span>
        </a>
    </div>

    <div class="associated-images__scroll scroll-down">
        <i class="glyphicon glyphicon-chevron-down"></i>
    </div>
</div>