Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
File manipulation
 Login/Join
 
Gold member
posted
Is there a way to access files and folders within a Focus request? I'm trying to access a folder over the network and then check to see the files in that folder. I know that the dos command dir > list.txt will give the list of files... I just have to see the folder.

I would have to access it like //compname/folder.

thanks,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Reply With QuoteReport This Post
<Pietro De Santis>
posted
this sample might help:

-SET &WINDIR_FILE = 'C:\TEMP\windir.txt';

DOS C:
-RUN

CD C:\IBI\Apps\p700\
-RUN

DOS DIR > &WINDIR_FILE
-RUN

FILEDEF WINDIR DISK &WINDIR_FILE
-RUN

TABLE FILE WINDIR
PRINT *
WHERE FILE_NAME CONTAINS '.txt' OR FILE_NAME CONTAINS '.TXT'
END
-RUN
 
Reply With QuoteReport This Post
Gold member
posted Hide Post
It seems that DOS can't CD onto a network drive. I found one that works,

DOS PUSHD \\compname\folder
..
..

DOS POPD

thanks anyways,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Leo, we use CMD instead of DOS and we're in a win2k environment
The CMD command works for us and allows us to move all over the network, (once we have overridden win2k's annoying tendency to refuse to maintain persistent connections)
so, things like
CMD NET SEND computername &MYMESSAGE &LINES
will work within a fex as it finishes executing.
and
CMD CD wherever
CMD DIR *.FEX > SOMEFILE.TXT
and then read the file, as Pietro suggests.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Using CMD instead of DOS I think does the same thing, I can't CD onto a network drive so I would still have to use the PUSH POP method.

thanks anyways,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Leo, do you have the network drives mapped?
As i read your post again, it looks as tho you don't have them mapped, but rather you are looking to reference computers by name rather than drive letter. If thats the case, that's very interesting way you have worked out to do that. Would you let me know?? That would get around that whole persistent-connection for us.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Yes I am trying to access the computer through the UNC path instead of mapping it. But I couldn't get it working that way because of our Network setup. Instead I opted to create a batch file that will do all the CMD/DOS commands then execute the fex program to finish it off.

thanks anyways,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Reply With QuoteReport This Post
Silver Member
posted Hide Post
Leo,
This command works from my local fex:
CMD DIR \\MKDEV01\C$\*.BAT

Of course, there has to be some share name, in this case I used C$, which is the default for us.
 
Posts: 44 | Location: New York City | Registered: May 23, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.