• Post Reply Bookmark Topic Watch Topic
  • New Topic

Copy directory and replacing strings into files

 
Raj Mama
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have req, that :

There are 3 arguments
one is source directory ,
two is destination directory and
third one os mapping file which contains value pairs.

copy the whole (including folders and files)source directory to destinatio directory and while copy or after coping to desination dir , I need to take string and value from mapping file and replace into dir files.

like source dir having some templates like we put $Name$ , so here the $name$ value mapped in mapping file, take that value and replace into destination directory file..

I hope some body will help me.

Thanks,
Raj
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's break this down to three problems

1) Listing all the files in the source directory
2) Reading from source and writing to target
3) Making the text substitutions

Which ones are you comfortable with? Where are you stuck? We work best when you can post a short bit of code that almost works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!