-
I need to access a directory with a space in it.
exmple: ftp.execute "ftp://1.1.1.1", "get /azzmodan file/file1.zip c:\temp\file1.zip"
The problem is that it won't accept /azzmodan file/file1.zip it thinks it should get /azzmodan and save it as file/file1.zip so it completely bugs on me.
How would i access the dir?
The dir is on an NT Server running IIS5
It won't accept azzmodan+file or azzmodan%20file.
Thx.
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
-
Nope ;(
Ill try it with the getfile api maybe that that will work.
Thx for the reply though.
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
-
try replacing the space with a %20 or %2D i forget which, they replace the spaces and the server will understand them.
-
does this work?
Code:
Dim strtemp As String
strtemp = "/azzmodan file/file1.zip c:\temp\file1.zip"
ftp.execute "ftp://1.1.1.1", "get " & strtemp
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Try this way:
'Initialize your connections
Inet.AccessType = icUseDefault
Inet.Protocol = icFTP
Inet.URL = "ftp.YourUrl.com"
Inet.UserName = "YourUserName"
Inet.Password = "YourPassWord"
Inet.RemotePort = 21
Inet.RequestTimeout = 60
'What folder you want to go
Inet.Execute , "CD azzmodan file"
Do
DoEvents
Loop While Inet.StillExecuting
'Get file in IIS
Inet.Execute , "GET file1.zip C:\Temp\file1.zip"
Do
DoEvents
Loop While Inet.StillExecuting
'Close your connections
Inet.Execute , "QUIT"
Do
DoEvents
Loop While Inet.StillExecuting
- Dj4
-
I realised last night that my posting wouldn't work!
have you tried this sort of thing?
Code:
Dim RemoteFile As String
Dim LocalFile As String
RemoteFile = "'/azzmodan file/file1.zip'"
LocalFile = "'c:\temp\file1.zip'"
ftp.Execute "ftp://1.1.1.1", "get " & RemoteFile & " " & LocalFile
I never have much luck with the Internet transfer control and prefer to use APIs to Wininet dll
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
aussiejoe:
That didn't work, i tried the %20 like webbrowsers do it, it just reply's that the Dir Azzmodan%20File doesn't exist.
dj4:
No luck, and even if it would it would only be a cheap work around, because in the dir is a file with a space in the name.
Mark Sreeves:
Tried that to, didn't work either
I normally use the wininet.dll but for this project I MUST use the ITC
My first question on this board and no one is able to help me :(
Thanks guys ill keep looking around
(Or ill just tell my boss it can't be done and that i need ascii transfer anyway.)
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
[This message has been edited by Azzmodan (edited 01-26-2000).]
-
Get rid of the F****** space!
Proper servers (ie. UNIX) don't allow it anyway! ;)
-
TRY THIS
ftp.execute "ftp://1.1.1.1", "get '/azzmodan file/file1.zip' c:\temp\file1.zip"
OR THIS
DIM VBQUOTE=CHR(34)
ftp.execute "ftp://1.1.1.1", "get " & VBQUOTE & "/azzmodan file/file1.zip" & VBQUOTE & " c:\temp\file1.zip"
-
Guess I should proof read first!!
TRY THIS
ftp.execute "ftp://1.1.1.1", "get '/azzmodan file/file1.zip' c:\temp\file1.zip"
OR THIS
CONST VBQUOTE=CHR(34)
ftp.execute "ftp://1.1.1.1", "get " & VBQUOTE & "/azzmodan file/file1.zip" & VBQUOTE & " c:\temp\file1.zip"
Better yet, run ftp from the dos prompt to figure out the correct FTP syntax is, then work to replicate it in VB
it should probably look like this
get "/azzmodan file/file1.zip"
c:\temp\file1.zip"
on a single line of course
------------------
-
Azzmodan
You've got me puzzled now!
continuing our discussion on: http://www.vb-world.net/ubb/Forum4/HTML/000900.html
I had a play around with my website on virgin.net which I was sure was a UNIX system, and that dows seem to allow spaces.
When I was a University I did most of my work on a UNIX system and I certainly couldn't have spaces then! I know there are serveral differnt flavours of unix.
Maybe webserversare different.
secondly, I feel I must retract my comment about unix being proper servers.
I am suddenly an NT Server devotee!
I have been developing a (prototype) "web Based" mantenance tool to run on an intranet which runs happily on an NT server. My system uses ASPs to access data in a database. I have written two DLL which access the database (as well as using an ODBC connection), write a set of files to the hardrive and then FTP them to a UNIX box where they ae used as input files for another system.
Yeah so what! I hear you say.
Well, the thing is, it seems that the customer probably wants to use Netscape Server instead of NT Server! :(
That's right.
No embedded DLLs
No easy peasy databse connections,
No VB Script
and my 1000 + lines of code in ASPs will go straight in the bin!
I think I'm going to cry! ;)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company