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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acessing files and directories on sharepoint

Status
Not open for further replies.

ontsjc

Technical User
May 17, 2000
113
Hi all,

I have a project where I need to have a user select a sharepoint directory, then copy the contents of that directory (which will be just a series of text files) down to a local harddrive. I was hoping to use some varient of GETDIR and DIR to select the directory and then read it to copy the files down. However I'm not sure how to access the files with the web address. Any thoughts or help would be much appreciated.
 
As far as I know you have the "OPen with Explorer" option on some sharepoint locations to load files as usual, even if it's hosted online. This may be a reason users think it's easy to program a file copy. It's not. There's a lot of "trickery" going on, if the explorer displays a remote file folder. I even don't know what's used behind the scenes, quite sure it's not FTP, but perhaps WebDAV.

You won't be able to access files from VFP with COPY FILE etc. unless it's an intranet Sharepoint where users have access to the Intranet servers folders for hosting the sharepoint files, then of course you can also read or write files directly in the file system. The "adress" then of course isn't a url anymore.

The whole point about Sharepoint is, that you have more than just a file share and what your task is, is to go back to a simple file share.

Bye, Olaf.

 
Thanks Olaf. I figured it was something like that. I tride accessing it via more traditional ftp as well with no luck. I've also tried temporarily mapping to a drive letter. That didn't work either. Guess I'll keep digging.

Thanks!
 
hi, we are encountering strange and randomic problem with pack instruction
here an example of code
USE RNRE01T EXCL
SELECT RNRE01DT
SEEK xcod
DELETE WHILE .NOT. EOF() .AND. RETIPO+RECOD==xcod
..
..
..

SELECT rnre01dt
FLUSH && ##MOD 19/03/14,0149
WAIT WINDOW "Attesa(2a) - "+STR(w_CicRit10,2,0)+" secondi per accedere a RNRExxDT" TIME w_CicRit10 && ##MOD 19/03/14,0149
PACK

it happens that the pack istruction cause a "file access is denied" error.
error occur in an apparent randomic way , but only if file is accessed through the network.
Any idea?
thank's
Luca Colombo
 
Welcome, Luca

When you want to ask your own question, at forum184 use the "Start a New Thread" section there. Don't answer on a running thread. New threads will be highlighted to us in that forum overview, you can be sure you're noticed.

To still answer your question, the shorthand solution is not to pack at all. Instead SET DELETED ON. You can't PACK without exclusive file access, which is denied as long as a user has the file open shared, even if it's just the current user. FLUSH or WAIT will not change that.

PACK is an operation you do on DBFs off working hours. It's a maintenance operation. SET DELETED ON/OFF is there to control if the deletion flag of records is effectivley limiting all data access or not. ON means you won't see any deleted data in brows, grids, sql-selects, etc. OFF means the deleted flag is not taken into account and you can see and query all recrods.

Bye, Olaf.
 
Also, you will be noticed about new answers to your own thread, but not about new answers in the thread of somebody else. Obviously this is the case, a bit unfortunate for you, if your problem is urgent.

Bye, Olaf.
 
Luca,

I agree with Olaf when he said you should start a new thread for this question. Questions about packing files and problems with "file access denied" are are fairly common. Many people here can help you with them. And other site visitors might have the same problem, and will want to see the solutions.

The trouble is that, by adding your question to a thread regarding Sharepoint, not many people will see it. The Sharepoint question is relatively specialised, and it's likely that many of the forum's regular visitors won't bother to look in it.

If you are still having this problem, I strongly recommend that you start a new thread for it (with a title that indicates the nature of the problem). I'm sure Olaf won't mind repeating his answer there, and then other people can join in the discussion. Once you have done that, I will signal to the forum management to delete the post here and its subsequent replies.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top