I need to move some files named in one text file to directories named in another different text file. Using Batch commands.

What I've tried.

```
@echo off 
echo.
REM check if file is there
if exist K:\file_sync_diff\FileNameList.txt goto Label 1
REM display error
echo Can not find the File Name List
echo.
echo.
Pause
goto :eof

:Label 1
REM display that the file in the last check was found
echo found FileNameList.txt
REM check if file is there
if exist K:\file_sync_diff\FileDumpText.txt goto Label 2
REM display error
echo Can not find File Dump Text File
echo.
echo.
Pause
goto :eof

:Label 2
REM display that the file in the last check was found
echo found FileDumpText.txt
REM check if file is there
if exist K:\file_sync_diff\DirectoryNames.txt goto Label 3
REM display error
echo Can not find Directory Names Text File
echo.
echo.
Pause
goto :eof

:Label 3
REM display that the file in the last check was found
echo found DirectoryNames.txt
REM for loop to filter through every line in a file
echo.
for /f %%i in (K:\file_sync_diff\FileNameList.txt) do call :Sub %%i
goto Label 4
goto :eof

:Label 4
REM display message of the file being moved
echo.
echo Moving %1
REM copy the file just made to a directory with a name supplied in a text file 
for /f %%i in (K:\file_sync_diff\DirectoryNames.txt) do call :Sub 2 %%i
echo.
goto :eof

:Sub
echo Writing %1
REM copy the contents of FileDumpText.txt to the file that was passed in the last method
type K:\file_sync_diff\FileDumpText.txt >>  %1.txt
goto :eof

:Sub 2
REM moves the file to the directory supplied by label 4.
move /y %1.txt %1
echo.
goto :eof

```

Contents of `FileNameList.txt`

```
red 
orange
purple

```

Contents of `DirectoryNames.txt`

```
K:\file_sync_diff\cat
K:\file_sync_diff\dog
K:\file_sync_diff\333

```

Not that it matters but the contents of `FileDumpText.txt`  

Test text to be passed to the file

```
more text 1
more text 2
more text 3

```

The directories do exist in the `K:\file_sync_diff` folder.

Thank you for your help.

The end result should be the following
directory cat with red.txt inside with all of the contents of FileDumpText.txt inside it
directory dog with orange.txt inside with all of the contents of FileDumpText.txt inside it
directory 333 with purple.txt inside with all of the contents of FileDumpText.txt inside it