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.
+ Reply to Thread
Results 1 to 5 of 5
-
Last edited by Bouboule; 29th Jun 2023 at 05:20.
-
It would be easier to just use cmd, change directory to specific subfolder and use dir *.txt or dir *.jpg
-
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.
Similar Threads
-
Rename single file in a directory based on the content of a txt file
By D.LUFFY in forum ProgrammingReplies: 3Last Post: 7th Jun 2023, 12:16 -
Curl or Wget command to capture vtt subs?
By daigo99 in forum SubtitleReplies: 3Last Post: 5th Sep 2021, 20:16 -
Wget Help
By ghostrewel in forum Video Streaming DownloadingReplies: 6Last Post: 21st Jul 2019, 18:21 -
wget from download section,...
By Selur in forum Newbie / General discussionsReplies: 2Last Post: 29th Jun 2019, 09:28 -
ffmpeg command to create fixed size encodes regardless of length
By electron.rotoscope in forum Video ConversionReplies: 0Last Post: 12th Feb 2019, 13:56