Hi,
I want to incorporate a check in my script.
If local/remote directory is {empty}
then
Wait...
Else
upload files
I know that we can use the getlist command
but then??
how can i check the $mylist if it is empty?
Will it work with something like this Thanks
I want to incorporate a check in my script.
If local/remote directory is {empty}
then
Wait...
Else
upload files
I know that we can use the getlist command
FTP Script
how can i check the $mylist if it is empty?
Will it work with something like this Thanks
Using the COUNTELEMENTS command. Very easy:
FTP Script
- # This is a label it marks a point in the script. It is used to jump here.
- :start
- # Get the local file listing, store it in $mylist
- # Calculate the number of elements in the list
- GOTO :start
- # Upload the files
liked Script FTP? Try our other product Email Parser
WOO
this is great
When i have finalized my script i will send it to you
Think it's a nice example and good usable for some people
I don't know much about programming but ScriptFTP i do understand...with some help of you haha
Know i need to know how to upload a whol directory at once, similiar to dos command "mput"
thanks
this is great
When i have finalized my script i will send it to you
Think it's a nice example and good usable for some people
I don't know much about programming but ScriptFTP i do understand...with some help of you haha
Know i need to know how to upload a whol directory at once, similiar to dos command "mput"
thanks
Hi Admin.
I implemented your coding but for some reason it's not processing if the results is larger then fe 1.
It see's that there are 2 files but then it goes back to : startdir and again checks and sees it has 2 files.
it will not go to :checkconnection.
I tried also the other way around. but then it keeps processing and does no wait..
Any idea? I tried also a WHILE but that didn't help either.
Thanks
I implemented your coding but for some reason it's not processing if the results is larger then fe 1.
It see's that there are 2 files but then it goes back to : startdir and again checks and sees it has 2 files.
it will not go to :checkconnection.
I tried also the other way around. but then it keeps processing and does no wait..
Any idea? I tried also a WHILE but that didn't help either.
Thanks
FTP Script
- ########################################################################################
- # Check if the directory is empty, or if it contains files to process
- ########################################################################################
- :startdir
- GOTO :startdir
- GOTO :checkconnection
- ########################################################################################
- # Check if Connection is live
- ########################################################################################
- :checkconnection
- Â GOTO :batch1
- Â GOTO :reconnect
- ########################################################################################
- # Create trigger files for each original file and move the files to a TEMP folder
- ########################################################################################
- :batch1
- $trgfilename=$windows_filename.".trg"
- #########################################################################
Hello,
If I have understood correctly you wish to check if the directory is empty:
HTH.
Zythan
If I have understood correctly you wish to check if the directory is empty:
IF ($checklist<=1)For me you are checking for 1 or less,
HTH.
Zythan
HI Zythan,
Indeed I want to check if directory is empty but during my tests i even tried to look for <=1
Nothing works..
Try yourself the script i placed here, you will see that it never
I think it's somewhere in the if $mylist>=1 or in the counting of the elements.
Thanks
Indeed I want to check if directory is empty but during my tests i even tried to look for <=1
Nothing works..
Try yourself the script i placed here, you will see that it never
FTP Script
Thanks
Okay, I found the error
With the code below it realy checks and executes the correct path....
With the code below it realy checks and executes the correct path....
FTP Script
- # Get the local file listing, store it in $mylist
- # Calculate the number of elements in the list
- GOTO :start
- # Upload the files
- All times are UTC -