Focal Point
File manipulation

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4551097331

August 13, 2004, 06:12 PM
Leo L
File manipulation
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
August 13, 2004, 06:29 PM
<Pietro De Santis>
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
August 13, 2004, 07:05 PM
Leo L
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
August 13, 2004, 07:10 PM
susannah
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.
August 17, 2004, 02:02 PM
Leo L
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
August 17, 2004, 04:01 PM
susannah
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.
August 17, 2004, 06:52 PM
Leo L
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
August 17, 2004, 08:12 PM
Steve C
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.