ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

File names in IFS folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File names in IFS folder

    Hi,

    I haven't been on the site for a while.

    We have thousands of documents in an IFS folder with multiple sub-folders that have to be brought into our imaging system. We have a program that normally reads the directory listing, we read the file names and then we import the PDFs from there. This has worked fine for years.

    For the new group of documents, however, some are named rather strange and out regular program and even QSH(ls - don't not see them for some reason.

    They have names like kyoScan-‎10‎.‎4‎.‎2023-‎13‎.‎27‎.‎57.pdf.

    Windows file explorer can see them but the programs on the IBM I do not see them and ignore. If I manually rename them in Windows to something simpler it works fine. There are thousands of these. Any ideas how I can programmatically see and rename them on the IBM I?

  • #2
    Sorry, I don't see why ls wouldn't be able to see a file like this. I don't see anything unusual about the name?? Are you certain the first character of the name isn't a . (dot) character??! Your example has the letter 'k'.

    The other possibility, of course, is a difference in authority. If the Windows access shows the files but QSH does not, it could mean that the Windows process is running with a different authority.

    I would suggest writing a program with the system APIs, opendir, readdir, closedir... make sure that the user has adequate authority. This will work because everything (including LS and the NetServer that is being used for Windows access) use these system APIs under the covers. So if anything can access the filenames, it's these.

    Comment


    • #3
      I couldn't fine a reason either. When I rename them, it works fine. There are thousands of them to process. Manually renaming them is no longer an option. I will check out the system APIs

      Comment

      Working...
      X