Jump to content

Please help in this code


Recommended Posts

Posted

mama - "its not working" ante em autundi run cheste? compile ayyi renaming sarigga pani cheyyatleda leka exception emaina vastunda? koncham specific details cheppu.

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

  • Cheddi Chinnodu

    12

  • dkchinnari

    6

  • The QUEEN

    4

  • Nellore Pedda reddy

    3

Top Posters In This Topic

Posted

[quote author=PMREDDY19 link=topic=165263.msg1987623#msg1987623 date=1299694299]
answer dorikinadhaa..???

nenu maa chellini aduguthunna if she can find out the issue..

manaki kuda  javani chusthey... inthey ...
[/quote]
ledhu baa...unna file mayam avuthundi endho emo...idhi java kadhu baa groovy script...almost java ne anuko  @3$% @3$% @3$%

Posted

[quote author=mickey link=topic=165263.msg1987630#msg1987630 date=1299694337]
mama - "its not working" ante em autundi run cheste? compile ayyi renaming sarigga pani cheyyatleda leka exception emaina vastunda? koncham specific details cheppu.
[/quote]
no exception baa.....unna file with bad extension kastha mayam avuthundi....  .imp ledhu .eof kooda create kavatam ledhu  sAng_banghead2 sAng_banghead2 sAng_banghead2

Posted

[quote author=BENZBABU link=topic=165263.msg1987560#msg1987560 date=1299693710]
[img]http://www.gifsoup.com/view1/1351924/benzbabuposts-o.gif[/img]
[/quote]

same feeling  F@!n F@!n F@!n

Posted

[quote author=vishwamithra link=topic=165263.msg1987582#msg1987582 date=1299693847]
benz post lkau manam ese jiff baa  @3$% @3$% @3$%
[/quote]
LoL.1q LoL.1q LoL.1q LoL.1q LoL.1q

Posted

[quote author=Cheddi Chinnodu link=topic=165263.msg1987561#msg1987561 date=1299693714]
[size=12pt]def renameBadsInPassIn = {source, bad ->
  def loc = getLandingLocationsBySource(source)
  if (loc == null){
      println "No LandingLocations for capture source $source - skip bad file ${bad} "
      return
  }
  def badFile = new File(bad)
  def index = badFile.getName().lastIndexOf('.');
  def filename=null
  if (index>0&& index <= badFile.getName().length() - 2 ) {
    filename=badFile.getName().substring(0, index)
  }
  [color=red]def eof=filename+".eof"[/color]
  def eofFile = new File(eof)
  [color=red]def impFile=filename+".bad"[/color]
  File f=new File(impFile)
  def rst=badFile.renameTo(f)
  if (rst == false){
      totalError++
      println "Cannot rename bad file ${bad} to ${impFile}"
  return
  }
  if (!eofFile.exists()){
      rst = eofFile.createNewFile();
      if (!rst){
        totalError++
        println "Cannot create eof file ${eof}"
        return
      }
      eofFile.setReadable(true, false)
  }
 
      totalRename++
      println "Rename imp file ${bad} To ${impFile}"
}[/size]
[/quote]

yee + badhulu append string vadii chusava..??

Posted

[quote author=Pranav link=topic=165263.msg1987704#msg1987704 date=1299695111]
yee + badhulu append string vadii chusava..??
[/quote] last ki rename aitunay ani message display aitundi mama .. kani aa file mayam aitundi dir nundi  sAng_banghead2 sAng_banghead2 sAng_banghead2  F@!n F@!n F@!n

Posted

[quote author=PILLABACHAPK link=topic=165263.msg1987688#msg1987688 date=1299694927]
LoL.1q LoL.1q LoL.1q LoL.1q LoL.1q
[/quote] LoL.1q LoL.1q sHa_fr1ends sHa_fr1ends

Posted

[quote author=kiraaaak link=topic=165263.msg1987719#msg1987719 date=1299695250]
last ki rename aitunay ani message display aitundi mama .. kani aa file mayam aitundi dir nundi  sAng_banghead2 sAng_banghead2 sAng_banghead2  F@!n F@!n F@!n
[/quote]check the location once in code by printing the path sSa_j@il

Posted

[quote author=Pranav link=topic=165263.msg1987704#msg1987704 date=1299695111]
yee + badhulu append string vadii chusava..??
[/quote]
groovy lo append method ledhu baa... + use cheyyali to conatenate two strings  sHa_fr1ends

Posted

[quote author=The QUEEN link=topic=165263.msg1987745#msg1987745 date=1299695529]
check the location once in code by printing the path sSa_j@il
[/quote]
aa code lo path changing ki code em ralaledhu gaa..I am trying to rename a file in a particular directory....destination kooda same directory  sHa_fr1ends

Posted

[quote author=Cheddi Chinnodu link=topic=165263.msg1987809#msg1987809 date=1299695986]
aa code lo path changing ki code em ralaledhu gaa..I am trying to rename a file in a particular directory....destination kooda same directory  sHa_fr1ends
[/quote]okay  sHa_fr1ends
I mean ee below lines code lo source emi istundo ani, I dnt knw much coding  sSa_j@il

def loc = getLandingLocationsBySource(source)
  if (loc == null){
      println "No LandingLocations for capture source $source - skip bad file ${bad} "
      return
  }

Posted

[quote author=The QUEEN link=topic=165263.msg1987913#msg1987913 date=1299696643]
okay  sHa_fr1ends
I mean ee below lines code lo source emi istundo ani, I dnt knw much coding  sSa_j@il

def loc = getLandingLocationsBySource(source)
  if (loc == null){
      println "No LandingLocations for capture source $source - skip bad file ${bad} "
      return
  }

[/quote] thankyou  you rock you rock  you were right...akkada filename absolute path pass cheyyatam ledhu...anduke they might be renamed some where else .I figured that out now... sHa_fr1ends sHa_fr1ends sHa_fr1ends

Posted

[quote author=Cheddi Chinnodu link=topic=165263.msg1987949#msg1987949 date=1299696841]
thankyou you rock you rock  you were right...akkada filename absolute path pass cheyyatam ledhu...anduke they might be renamed some where else .I figured that out now... sHa_fr1ends sHa_fr1ends sHa_fr1ends
[/quote]

So you got the solution now ??




congratulations congratulations congratulations congratulations

Posted

first try to create a new file with "filename.eof" by providing the complete path and check if the file is getting created at all  in the location  and then try to write contents of the original file into this file .

×
×
  • Create New...