HI
I need to copy .dll files in C:\Windows\system32\ which is found or match in my my_file.txt file to C:\tools folder.
my code not work and need also to found words that can match my_file.txt.
so for example I have RICHED20.dll in my my_file.txt if the same file name"RICHED20.dll" exist in C:\Windows\system32\ the RICHED20.dll copy to my C:\tools
import os
import shutil
source = os.listdir "C:\Windows\system32\"
destination = "C:\tools"
for files in source:
if files.endswith(".dll"):
shutil.move(files,destination)
my_file.txt
dbghelp.dll
RICHED20.dll
Riched32.dll
napinsp.dll
wshbth.dll
cscapi.dll
pnrpnsp.dll
winrnr.dll
rasadhlp.dll