Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IniReadPvt iFtpGet
Precautions when using INI operations:
Do not mix file operations and INI operations. This is not a feature of WinBatch but of Windows. When you use the iniWritePvt() to update an INI file, Windows broadcasts a message to everybody so that processes that have to read the INI file know that the file needs to be re-read.
Overwriting an INI file with File operations (like iFtpGet) doesn't result in this broadcast. As a result, nobody, including WinBatch, will know that the file is changed, and everybody, including WinBatch, will use its buffered copy to continue processing.
AddExtender("wwint34I.dll") tophandle=iBegin(0,"","") conhandle=iHostConnect(tophandle,"ftp.myserver.com",@FTP, "jane", "tarzan") if conhandle==0 message("ERROR","Unable to connect to host") exit endif newfilename=Timeymdhms() ;parsetime to get valid filename newfilename=strreplace(newfilename,":","") Currdir=iFtpDirGet(conhandle) getfile=iFtpGet(conhandle,"%Currdir%\myfile.ini","c:\windows\desktop\%newfilename%.ini",0,0) if getfile==0 then message("Oopps!",strcat("iFtpGet Failed check:",@CRLF," -Remote file path",@CRLF," -Overwrite Param(does local file already exist?)")) iClose(conhandle) iClose(tophandle) ;Maybe delete that inifile if its nolonger needed ;FileDelete("c:\windows\desktop\%newfilename%.ini") Message("All","Done") exit
Article ID: W12597
Filename: iFtpGet to get INI file.txt
File Created: 2017:07:28:12:58:47
Last Updated: 2001:03:01:14:23:42