I was given some vb code (not my area at all) to copy certain text files to another location if they contain a keyword. Basically Ihave a folder full of text files, but I want to copy all the text files that contain a certain keyword to another folder.
the code provided was:
for /r C:\originalresults %%a in (*.txt) do (
find "back" "%%a"
if !errorlevel!==0 copy "%%a" "C:\users\me\Desktop\results" /y
Now when I run this script i.e. from command prompt
cscript thisscripts.vbs I get an error "expected identifier", can anyone assist in where I am going wrong?