Sunday, 15 May 2011

how to search a file from multiple path and paste it in other locations using batch file -



how to search a file from multiple path and paste it in other locations using batch file -

i need search file 2 paths either programme files or programme files x86 , re-create file , paste in other location.

now have used script as

@echo off xcopy c:\"program files (x86)"\adobe\"adobe presenter 10.0"\"gallery"\"interactions"\"collaboration" %~dp0 /e /h /k /o /y echo files copied! pause

appreciate help on this.

you should prepare quotes. there should quotes @ origin , end of each path. this:

"c:\program files (x86)\adobe\adobe presenter 10.0\gallery\interactions\collaboration"

you may want set quotes around:

"%~dp0"

in case path has spaces in it.

i'd create quick, simple script like:

@echo off if exist "c:\program files (x86)\adobe\adobe presenter 10.0\gallery\interactions\collaboration" ( xcopy "c:\program files (x86)\adobe\adobe presenter 10.0\gallery\interactions\collaboration" "%~dp0" /e /h /k /o /y echo copied programme files (x86) ) if exist "c:\program files\adobe\adobe presenter 10.0\gallery\interactions\collaboration" ( xcopy "c:\program files\adobe\adobe presenter 10.0\gallery\interactions\collaboration" "%~dp0" /e /h /k /o /y echo copied programme files ) pause

file batch-file

No comments:

Post a Comment