I don't see the FTP command in your log file, was from earlier test?
Since you cannot see on Server, then I wonder if FTP line is correct. Would be good to see content from log file. You can edit login name and password with dummy data before submitting here for review.
Although %variable% symbols are not always needed, I usually use the %symbols% anyway because then I can see the actual value in the log file, else I only see the variablename and errors are not so obvious.
Example lines:
Let>k=%k%+1
Until>%k%,%file_names_count%
File Dates
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
Code Review
Here is my most recent script for this:
Let>path=C:\Program Files\Apache Group\Apache\htdocs\fordofkirkland\
GetFileList>%path%test\*.*,files
Separate>files,;,file_names
Day>the_day
Month>the_month
Year>the_year
Let>k=0
Repeat>k
Let>k=k+1
//Get the date of the file
FileDate>file_names_%k%,fdate
if>fdate=%the_year%%the_month%%the_day%
//FileDate matches today's date, local_file is current file
Let>local_file=file_names_%k%
//remove path from local_file to get remote file name
StringReplace>local_file,path,,remote_file
//ftp the file, modify next line for server,user,pass, remote directory, txfer mode
FTP_STATUS>1
FTP_PASSIVE>1
FTPPutFile>host,username,password,21,local_file,/public_html/test/%remote_file%,I
endif
Until>k,file_names_count
End
Let>path=C:\Program Files\Apache Group\Apache\htdocs\fordofkirkland\
GetFileList>%path%test\*.*,files
Separate>files,;,file_names
Day>the_day
Month>the_month
Year>the_year
Let>k=0
Repeat>k
Let>k=k+1
//Get the date of the file
FileDate>file_names_%k%,fdate
if>fdate=%the_year%%the_month%%the_day%
//FileDate matches today's date, local_file is current file
Let>local_file=file_names_%k%
//remove path from local_file to get remote file name
StringReplace>local_file,path,,remote_file
//ftp the file, modify next line for server,user,pass, remote directory, txfer mode
FTP_STATUS>1
FTP_PASSIVE>1
FTPPutFile>host,username,password,21,local_file,/public_html/test/%remote_file%,I
endif
Until>k,file_names_count
End
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
Variables
I will work on getting in the habbit of using the % symbols for variables. I already posted part of my log file. See earlier in this post.
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
All Hail BOB HANSEn
Hey Bob and Support team thanx for your help on this matter. My brain is small so please forgive me for all the blabbering today. I've got the pics to upload, of course I've somehow managed to append test\ at the beginning of each file but I'll hopefully figure this one out on my own.
-
- Pro Scripter
- Posts: 68
- Joined: Wed May 04, 2005 10:24 pm
We can close the book on this one
Ok finally got it working. I wasted most of the day on this but the way I figure it is that this will help save about 20 minutes a day. Now multiply that by 5 days a week 50 weeks out of the year and thats a lot of time save.
One thing to note is in the original code support put up for me they had the following:
GetFileList>%path%photos*.*,files
This appended the word 'photos' to the file name and wasn't actually what I was looking for. But other than that everything worked out. Thanks again everyone.
One thing to note is in the original code support put up for me they had the following:
GetFileList>%path%photos*.*,files
This appended the word 'photos' to the file name and wasn't actually what I was looking for. But other than that everything worked out. Thanks again everyone.