ajetrumpet
Banned
- Local time
- Today, 03:00
- Joined
- Jun 22, 2007
- Messages
- 5,638
Hello all,
I have this code that opens my domain through DOS:
this is just like opening the command prompt and typing in FTP instead of CMD. The problem I am having is that my default directory for DOS is c/users/ajetrumpet/documents. as in, when I GET a file from the server after opening the above DOS prompt, it automatically downloads it to the directory I named above. What I would like is for it to download to my desktop directory. I have tried going to properties of the DOS prompt menu item and changing the "START IN" to the dir that I want, but that does not cover the above function. And it also doesn't cover it when I go to the DOS prompt from the windows menu and simply type CMD in the line. It only works with the shortcut icon.
Has anyone ever done this before and if so, do you have any advice? Thanks!
I have this code that opens my domain through DOS:
PHP:
Function test()
Dim vPath As String
Dim vFTPServ As String
Dim fNum As Long
Dim directory As String
vPath = "c:"
vFTPServ = "www.mydomain.com"
'Mounting file command for ftp.exe
fNum = FreeFile()
Open vPath & "\FtpMyDomain.txt" For Output As #fNum
Print #1, "USER UserName" ' your login
Print #1, "Password" ' your password
directory = InputBox("Which directory would you like?", "Directory")
If directory = "1" Or _
directory = "2" Or _
directory = "3" Or _
directory = "4" Then
Print #1, "cd " & directory
End If
Print #1, "dir"
Close
Shell "ftp -n -i -g -s:" & vPath & "\FtpMyDomain.txt " & vFTPServ, vbNormalFocus
End Function
Has anyone ever done this before and if so, do you have any advice? Thanks!