Hi everyone,
I'm new to ScriptFTP and am using the script below to sync from an FTP server to a local folder on the workstation. Once the sync is complete it leaves behind a .tmp file on the FTP server and the local folder. Seeing that it needs to run every 60 seconds it is placing hundreds of these temp files which I'd like deleted after every transfer or at the beginning of the next transfer.
Any suggestions?
I'm new to ScriptFTP and am using the script below to sync from an FTP server to a local folder on the workstation. Once the sync is complete it leaves behind a .tmp file on the FTP server and the local folder. Seeing that it needs to run every 60 seconds it is placing hundreds of these temp files which I'd like deleted after every transfer or at the beginning of the next transfer.
Any suggestions?
It is very strange. ScriptFTP does not create .tmp files anywhere. Could you send the script output with verbose mode enabled? Put VERBOSE(ON) on the top of your script and run it again. Then copy the output from ScriptFTP window and paste here.
Also, a file listing showing the tmp files would be very useful.
Also, a file listing showing the tmp files would be very useful.
liked Script FTP? Try our other product Email Parser
Hi there,
Here is the verbose output (some of it)
Here is the verbose output (some of it)
Running \\saxjnbdata\MyDocsRedir\snagel\My Documents\download1.ftp
VERBOSE(ON)
Verbose mode enabled
OPENHOST("ftp.flysaa.com","KEOPSAPP",******)
Connecting to ftp.xxxxxx.com
Resolving host name "ftp.xxxxx.com"
Connecting to xx.xx.xxx.xxx Port: 21
Connected to ftp.xxxxxx.com.
220-Microsoft FTP Service
220 Welcome
USER XXXXXX
331 Password required for XXXXXX.
PASS KEO#498
230-Welcome to the XXXXXX FTP Site
230 User XXXXXX logged in.
SYST
215 Windows_NT
FEAT
211-FEAT
SIZE
MDTM
211 END
TYPE I
200 Type set to I.
REST 0
350 Restarting at 0.
PWD
257 "/KEOPSAPP" is current directory.
Connected.
SYNC("C:\keopsapp","/keopsapp",DOWNLOAD,SUBDIRS)
CWD /keopsapp
250 CWD command successful.
PWD
257 "/keopsapp" is current directory.
Uploading temporary file to calculate server-client clock time difference.
PASV
227 Entering Passive Mode (57,67,145,196,15,214).
Opening data connection to 57.67.145.196 Port: 4054
STOR ScF3669.tmp
125 Data connection already open; Transfer starting.
74 bytes transferred. (N/A/s) (0 ms)
226 Transfer complete.
MDTM ScF3669.tmp
213 20100514091721
Remote Time: 05/14/2010 09:17:21
Remote Time: 05/14/2010 11:16:13
DELE ScF3669.tmp
550 ScF3669.tmp: Access is denied.
Clock time difference is -7132 seconds.
Synchronizing local directory C:\keopsapp from /keopsapp.
PASV
227 Entering Passive Mode (57,67,145,196,15,215).
Opening data connection to 57.67.145.196 Port: 4055
LIST
125 Data connection already open; Transfer starting.
24556 bytes transferred. (1.56 MB/s) (15 ms)
226 Transfer complete.
MDTM KEOPSAPP
The content of the .tmp files are always the same:
"ScriptFTP creates this file to calcul"
The names of each file is different every time:
"ScriptFTP creates this file to calcul"
The names of each file is different every time:
ScF169D.tmpetc etc etc...
ScF169D.tmp
ScF1DCA.tmp
ScF3669.tmp
ScF43D0.tmp
Ops, yes, it seems that ScriptFTP indeed creates tmp files on your FTP server... you were right. This is because ScriptFTP uploads a tmp file each time SYNC is used to calculate the clock time difference between the FTP server and the ccomputer where ScriptFTP is run. This way synchronizations can be done correctly. But just after calculating this value, the tmp file is no longer needed and deleted by ScriptFTP. This is the normal way to work but... Look at this (from your log):
If you can contact or have access to the server admin, try changing your user settings from FTP server.
[ScriptFTP says] DELE ScF3669.tmpIt seems that your FTP server does not allow ScriptFTP to delete the tmp file it created a few seconds before. This is because the FTP user has not enough rights to delete files... which is very strange because it is allowed to create files.
[Server replies] 550 ScF3669.tmp: Access is denied.
If you can contact or have access to the server admin, try changing your user settings from FTP server.
liked Script FTP? Try our other product Email Parser
Didn't even see that - thanks
I have assigned Delete rights to the FTP user. Thanks for your input; honestly appreciate it!
I have assigned Delete rights to the FTP user. Thanks for your input; honestly appreciate it!
WORKS LIKE A CHARM!!!!!!
liked Script FTP? Try our other product Email Parser
- All times are UTC -