Sorry guys, your suggestion didn't seem to work. I'm using Windows XP Pro version. Any other suggestions?
"xcopy \\server\path\10.
.??.
_Unique_name_lang\Something_else \\server\path\Test /s /e"
Here is the code I have:
echo off
set sourcedirMSI=K:\lang\10.0.1245.7777_Unique_name_lang\Something_else\file.txt
set sourcedirCAB=K:\lang\10.0.1245.7777_Unique_name_lang\Something_else\file.xml
set backupdir=C:\Test
for /f "tokens=*" %%a in ('dir "%sourcedirMSI%" "%sourcedirCAB%" /s/b') do (
xcopy "%%a" "%backupdir%%%~pa" /s/e
)
eof
The scenario is like this: The numbers in front are variables, they change often, so I want to find every folder that has _Unique_name_lang and file.txt/xml in it and copy it to C:\Test. At the moment I can only do a search in the lang folder for file.txt/xml, but this returns these files from all the folder and I only need the ones that contain _Unique_name_lang. I hope this makes sense!
Thanks
Soncu