I trying to concatenate c files path and the name of the file in one variable . I already try this code
@echo off
set "repository_path=C:\path\to\repository" REM Replace with the actual path to your repository
set "file_names="
for /r "%repository_path%" %%F in (*.c) do (
set "file_name=%%F"
set "file_names=!file_names! !file_name!"
)
echo All C file names: %file_names%
but the output i have is
All C file names: !file_names! !file_name!
instead of
All C file names: path/file1.c path/file2.c path/file3.c ... path/fileN.c