• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Copy directory and replacing strings into files

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic