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

CONNECTING TO A TERMINAL SERVER ENVIRONMENT FROM VISUAL FOXPRO 9 2

Status
Not open for further replies.

waylene12

Programmer
Mar 20, 2017
1
ZA
I am currently working on a APP TO UPLOAD AND DOWNLOAD FILE TO and FROM treminal server and local. Can someone Please pointy me into the right direction.
 
Well, I'm not really sure what you mean, but if you are looking to get a file from a TS server down to a client, you are going to need a mapped drive 'in session'.

To do this your client session must first have that enabled before you make a connection, and then you can shell out to run something like this:

Code:
NET USE X: \\TSCLIENT\SHAREPATH

That would probably get it moving.


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Hi waylene12,
this could be done with a small Powershell script and without the use of 'NET USE...'.
Powershell offers Set-Location, Get-ChildItem, Copy-Item and Remove-Item to handle local and remote directories.

Code:
    Set-Location \\servername\sharename
    Get-ChildItem \\servername\sharename
    Copy-Item \\servername1\sharename1\filename.ext \\servername2\sharename2
    Remove-Item \\servername\sharename\foldername\filename.ext

ADDED:
To give you an idea, about how to generate a powershell script with VFP have a look at this link where Calvin Hsia explains how it is done dynamically:
generate and run powershell scripts dynamically

HTH

-Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top