Home > Community > Forums > Custom IC SKILL > How to view a file which is named QQ[0].txt ?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to view a file which is named QQ[0].txt ? 

Last post Wed, May 9 2012 3:20 AM by Charley Chen. 2 replies.
Started by Charley Chen 09 May 2012 02:34 AM. Topic has 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, May 9 2012 2:34 AM

    How to view a file which is named QQ[0].txt ? Reply

    Hello ,

    In unix , I have a file QQ[0].txt , when I use command  vi  QQ[0].txt  it will becomes  vi  QQ\[0].txt , it can be opened.

    So it needs a back slash before \[  .

    When I use isFile("QQ\\[0].txt") ==> nil ,

    What's the way to determine a file which has bracket is exist ?

    Thank you,

    Charley

    • Post Points: 20
  • Wed, May 9 2012 3:13 AM

    Re: How to view a file which is named QQ[0].txt ? Reply

    Charley,

    You would just use isFile("QQ[0].txt") . No need to escape anything. The only reason you're having to escape the [ in the shell is because [ is a special character for the shell...

    getDirFiles("containingDir")

    will show you the actual names of the files.

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, May 9 2012 3:20 AM

    Re: How to view a file which is named QQ[0].txt ? Reply

    Andrew ,

    It works.

    Thank you,

    Charley

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Charley Chen at 09 May 2012 02:34 AM. Topic has 2 replies.