• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading FileName consists of #

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am facing little issue in reading the File Name

I am able to read the below Path contents

C:\DataRead\FBNK_ACCOUNTNAU_1.xml

But i am unable to read it from

C:\DataRead\FBNK_ACCOUNT#NAU_1.xml (Getting as System cannot find the file specified)

i think # is the problem in File Name. Kindly help me to resolve, how to read the file name Consists of #

Please provide me with Piece of example...

Regards/Karthick
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show the code you used to read the file along with the error message?
 
karthick sambanghi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

Thanks for the reply.

I am using the file Name directory in program arguments. Below is the Piece of code

public static int doWork(String args0)
throws IOException, SAXException,

ParserConfigurationException {
xmlFileName = args0;
}

Where args0 is the directory Path of the file. I am passing the directory path in Run configuration as program arguments.

For example :- When i pass args0 = C:\DataRead\FBNK_ACCOUNTNAU_1.xml (IT is working fine)

But the below one is not working

args0 = C:\DataRead\FBNK_ACCOUNT#NAU_1.xml

Please help me to rectify it.

Thanks in Advance..

 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not the code that is using the filename and you haven't supplied the error message as requested so it's a little hard to help you without guessing at solutions.
You could try wrapping the file path in quotes that sometimes helps on windows systems (are you even on a windows platform?)
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic