hi all, new here and doing my best with a bit of FTP code but have got stuck so would appreciate some help, thanks in advance...
I have the following bit of code
'------------------------------------------ 'Command format : [PUTFILES] = <local directory> ; <remote directory> 'Example : [PUTFILES] = C:\TEMP\ ; /test/ 'Puts files from the local drive on to the remote server 'PUT over rights the remote files If InStr(1, LCase(line), "[putfiles]") > 0 Then pos = InStr(1, line, "=") strData = Trim(Mid(line, pos + 1)) strFiles = Split(strData, ";") strLocal = Trim(strFiles(0)) strRemote = Trim(strFiles(1)) Call PutFiles(strLocal, strRemote) logfile.AddToLogFile ("Put files " & vbCrLf) Exit Sub End If
This is called by this line:
[PUTFILES] = "c:\program files\radio show\audio\" ; /radioshow/www/user/audio/ And this works BUT... the source filename loses the first 2 characters of its name and i cant figure out why. For example, if I put the file audio.mp3 in the audio folder in the source directory, it gets uploaded into the correct remote folder, but ends up as dio.mp3 ( i have tried other files and they all lose the first 2 charachters...)
I would appreciate any help on this, its doing my head in!!
Thanks again for your time in advance.