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.
|<Pietro De Santis>|
this sample might help:
-SET &WINDIR_FILE = 'C:\TEMP\windir.txt';
DOS DIR > &WINDIR_FILE
FILEDEF WINDIR DISK &WINDIR_FILE
TABLE FILE WINDIR
WHERE FILE_NAME CONTAINS '.txt' OR FILE_NAME CONTAINS '.TXT'
It seems that DOS can't CD onto a network drive. I found one that works,
DOS PUSHD \\compname\folder
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.
CMD CD wherever
CMD DIR *.FEX > SOMEFILE.TXT
and then read the file, as Pietro suggests.
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.
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.
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.
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.
|Powered by Social Strata|