Hi,
I need to be able to delete files within a local directory with a file size of 0, and then upload the remaing files to a remote FTP server. I've had a look at the GETFILESIZE, but strugging where to go from there.
Any help would be greatly appreciated!
Thanks.
I need to be able to delete files within a local directory with a file size of 0, and then upload the remaing files to a remote FTP server. I've had a look at the GETFILESIZE, but strugging where to go from there.
Any help would be greatly appreciated!
Thanks.
Hi Neil,
Try the following:
Try the following:
Code: Select all
# Change current remote directory
CHDIR("/myremotedirectory/")
# Retrieve remote file listing
GETLIST($list, REMOTE_FILES)
# For each file in the retrieved list
FOREACH $file IN $list
# If file size is 0 delete the remote file
IF(GETFILESIZE(REMOTE,$file)==0)
DELETEFILE($file)
END IF
END FOREACH
liked Script FTP? Try our other product Email Parser