VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Hi,

    I am looking for a way to find a .txt file in a folder where there are several links in order to recover .jpg files. For this, i use the command wget -i "<filename.txt>.
    If i put filename, it works but i would like my .bat script to find any .txt file with parameter : *.txt





    You can see an example:

    @echo off

    color 0A

    echo _________________________________________________
    echo SCRIPT RUNNING
    echo _________________________________________________

    set results_directory="G:\service INFORMATIQUE 5IVE\BIKE OFFICE\WGET"

    echo.
    if not exist %results_directory% (
    echo ERROR : %results_directory% doesn't exist.
    timeout /T 10 /nobreak > nul
    exit
    )

    rem "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" "G:\service INFORMATIQUE 5IVE\BIKE OFFICE\IMPORT_FICHIERS\Matrices internes\MACROS_ESTEVEZ\Step6.xlsm"

    cd %results_directory%

    rem it works
    wget -i "VAUDE stade 1.txt"

    rem it doesn't work
    wget -i "*.txt"

    timeout /T 10 /nobreak > nul
    exit





    Thank you for your help.

    Best regards.
    Last edited by Bouboule; 29th Jun 2023 at 05:20.
    Quote Quote  
  2. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    It would be easier to just use cmd, change directory to specific subfolder and use dir *.txt or dir *.jpg
    Quote Quote  
  3. Yes, it's already done. You can see bellow wget command.

    dir %results_directory%\*.txt

    It gives me many datas.
    I would like to just have filename and its extension.
    Quote Quote  
  4. Originally Posted by Bouboule View Post
    Yes, it's already done. You can see bellow wget command.

    dir %results_directory%\*.txt

    It gives me many datas.
    I would like to just have filename and its extension.
    dir /b %results_directory%\*.txt
    Quote Quote  
  5. OK I will try your solution.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!