|
-
Jan 24th, 2000, 12:00 PM
#1
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
-
Jan 25th, 2000, 01:57 AM
#2
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
-
Jan 25th, 2000, 11:50 AM
#3
Junior Member
try replacing the space with a %20 or %2D i forget which, they replace the spaces and the server will understand them.
-
Jan 25th, 2000, 12:34 PM
#4
Frenzied Member
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
-
Jan 25th, 2000, 02:14 PM
#5
Lively Member
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
-
Jan 25th, 2000, 04:22 PM
#6
Frenzied Member
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
-
Jan 25th, 2000, 07:37 PM
#7
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).]
-
Jan 25th, 2000, 08:38 PM
#8
-
Jan 26th, 2000, 03:29 AM
#9
New Member
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"
-
Jan 26th, 2000, 03:40 AM
#10
New Member
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
------------------
-
Jan 26th, 2000, 04:27 PM
#11
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|