How search and move files by script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:
I would appreciate any help to perfom this task: search all hard disk for
files which name contains a particular string (i.e. *Progs.*) and move them
to a certain folder.
I am thinking to write a VB6 program, but I suppose Windows sript could by
more simple and elegant. Is it possible ?
My best regards. Roberto
 
Roberto said:
Hello: I would appreciate any help to perfom this task: search all
hard disk for files which name contains a particular string (i.e.
*Progs.*) and move them to a certain folder. I am thinking to write a
VB6 program, but I suppose Windows sript could by more simple and
elegant. Is it possible ? My best regards. Roberto

From the CMD prompt (all on one line):

c:\>for /f "tokens=*" %a in ('dir /s /b *Progs.*') do @echo move "%~fa"
\somewhere

In a batch file, change '%' to '%%'.

If this appears to do what you intend, delete the word 'echo' to
actually move the files.
 
Back
Top