Hi All,
I have a script that update CSV file every min to check if user is active or idle. it's doing it successfully with fileappand commend on my local disk.
But i want to fileappend this CSV file on a FTP server i have user ID and password of that server but have no idea on how to write script to do that
Just thinking about FTP server and HTTP Server it make my head spin can anyone help me with the code i put in my script to and it will conect to the ftp and update the file in the background
how to fileappend CSV file on a FTP server and update it every min
-
- Posts: 89
- Joined: 10 Dec 2017, 06:57
Re: how to fileappend CSV file on a FTP server and update it every min
Hi,
I would try it using WINSCP https://winscp.net/eng/docs/scripting and its powerfull commandline options
J.B.
I would try it using WINSCP https://winscp.net/eng/docs/scripting and its powerfull commandline options
J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Re: how to fileappend CSV file on a FTP server and update it every min
Glancing at what Jovannb showed, I like what I see.
Alternatively, (and without having more than glanced at the tool Jovannb shared), if you install NetDrive, you can access remote FTP sites as if they were just another local drive on your computer. The script you already wrote will work on a remote FTP site if NetDrive is installed and a drive letter is assigned to the FTP site. The current version is a paid for version. If cost is an issue, older versions are free (1.x versions).
- Mike
Alternatively, (and without having more than glanced at the tool Jovannb shared), if you install NetDrive, you can access remote FTP sites as if they were just another local drive on your computer. The script you already wrote will work on a remote FTP site if NetDrive is installed and a drive letter is assigned to the FTP site. The current version is a paid for version. If cost is an issue, older versions are free (1.x versions).
- Mike
- divanebaba
- Posts: 804
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: how to fileappend CSV file on a FTP server and update it every min
Hello.
Uploading a file was a huge issue, till I solved. In help file the locale coding was missing.
As the ftp function with comspec is a windows function, the code for the locale was necessary, but not documented. Look example below:So you can now, after creating your csv-file and storing it localy, upload it to a host of your choice.
Look here for Codepages of different locales.
Uploading a file was a huge issue, till I solved. In help file the locale coding was missing.
As the ftp function with comspec is a windows function, the code for the locale was necessary, but not documented. Look example below:
Code: Select all
VarMitNamenDerZieldatei=D:\Files\members.csv
FTPBefehlDatei = %A_ScriptDir%\FTPBefehle.txt
FTPLogDatei = %A_ScriptDir%\FTPLog.txt
FileDelete %FTPBefehlDatei% ; Falls das vorherige Ausführen vorzeitig beendet wurde.
; ATTENTION ATTENTION - Maybe you must erase (delete) the comment inside the brackets
(
open ftp.NameOfMyWebsite.net
NameOfMyWebsite.net
********** <--- your password to access your host
binary
cd tracking ; this line is only necessary, if you have a subfolder. In this case, my subfolder name was "Tracking"
delete members.csv
put %VarMitNamenDerZieldatei%
bye
), %FTPBefehlDatei%, CP1252 ; <-- change this to your locale
RunWait %comspec% /c ftp.exe -s:"%FTPBefehlDatei%" >"%FTPLogDatei%"
FileDelete %FTPBefehlDatei% ; Löscht sie aus Sicherheitsgründen.
Run %FTPLogDatei% ; Zeigt das Protokoll zum Untersuchen an.
Look here for Codepages of different locales.
Re: how to fileappend CSV file on a FTP server and update it every min
Thx for that recommendation! Last freeware version 1.3.4 - [Download]mikek wrote:Glancing at what Jovannb showed, I like what I see.
Alternatively, (and without having more than glanced at the tool Jovannb shared), if you install NetDrive, you can access remote FTP sites as if they were just another local drive on your computer. The script you already wrote will work on a remote FTP site if NetDrive is installed and a drive letter is assigned to the FTP site. The current version is a paid for version. If cost is an issue, older versions are free (1.x versions).
- Mike
Re: how to fileappend CSV file on a FTP server and update it every min
Well, that's Freeware: [Bitkinex] - [Command Line]
Re: how to fileappend CSV file on a FTP server and update it every min
It does not appear that Bitkinex supports drive mapping. I could not find the feature, and per this review linked below, "it lacks the dead-simple interface of a mapped drive".
https://lifehacker.com/5623582/bitkinex ... or-windows
- Mike
https://lifehacker.com/5623582/bitkinex ... or-windows
- Mike
Re: how to fileappend CSV file on a FTP server and update it every min
At the end of that articles comment section(?) it's said that NetDrive is free of charge for personal/private use. So, go for that.mikek wrote:It does not appear that Bitkinex supports drive mapping. I could not find the feature, and per this review linked below, "it lacks the dead-simple interface of a mapped drive".
https://lifehacker.com/5623582/bitkinex ... or-windows
- Mike
Who is online
Users browsing this forum: yabab33299 and 126 guests