Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Just wondering if anyone has come a 1

Status
Not open for further replies.

ted95242

Programmer
Sep 9, 2001
22
0
0
US
Just wondering if anyone has come across this one before. I just got a new computer and went from Windows 98 to XP. In one program I issue the following cobol statement:

01 wa-work-area.
05 wa-dos-command pic x(30) value
"dir /b *.src-arc > dirlist.txt"

call "system" using wa-dos-command.

Using Windows 98 I got the following in dirlist which is what I want:

prg000.src-arc
prg001.src-arc
prg002.src-arc
etc.

Using XP I got the following which causes me a problem:

prg000~1.src-arc
prg001~1.src-arc
prg002~2.src-arc
etc.

Anybody have any idea how I can get the same type of list that I got with Win98? Is there perhaps another switch I could use with the "dir" command?

Thanks,

Ted
 
Since your file names do not conform to the 8.3 naming format, XP is showing you the short name generated. I don't quite understand why you are seeing an extension of .src-arc on the generated short name...

You can see all of the switches available by doing a DIR /? command. Perhaps the /X will be helpful.

At the worst case, you might need to do a regular DIR (without the very useful /B) and get the long file names out of the output.
Tom Morrison
 
The latest AcuCOBOL has built in directory processing via the C$LIST_DIRECTORY call. (I don't have my documentation handy, but it's something like that. I believe it appeared in 5.2.) That is a platform independent way of getting a directory list.

Glenn
 

Tom,

That solved the problem. I guess reading the manual every now and then does help. :)

Thanks Tom.


Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top