batch file - Robocopy with Wildcard in Source -


i'm trying write script copy folder 1 network location another. inside source folder, there number of folders approximately following structure:

fl_411_date
flight_412_date
flt_413_date

my goal copy specific folder, using number in folder name identifier.

is possible use robocopy in way?

my current command looks this:

robocopy "\\\source\\*%flightnumber%*" "\\\destination" /e 

however, doesn't work, wildcards aren't recognized in source path. suggestions how go task?

read help for , play one-liner in command line

for /d %a in (*%flightnumber%*) robocopy %a \destination /e 

or in more complete bat file

pushd "%source%" /d %%a in (*%flightnumber%*) robocopy "%%a" "%destination%\%%a" /e popd 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -