I have the script pasted below:
It will find files containing that string. In the last exmple, it moved a file named xx12.hw. There is always a companion file with this naming scheme x'#'
So, for the example above xx12.hw would have a companion file named x12 (no extension)
How do I get this script to find the xx'#'.hw files and move it, then move the x'#' version of the same file? The x'#' file doesn't have anything in it, so I can't search against it. I have to basically just move it based on the name of the other file found.
for /f "tokens=*" %%F in ('dir /b/a-d') do (
type %%F | find "TextToSearchFor" > nul
if not errorlevel 1 move "%%F" c:\BadQueueEntries