Hello,
I have a server that I have to ftp files off and they all start SGRD and are followed by 6 numbers.
The script I have will run every 10 mins to pick up files as new ones will be coming in all the time and what I want to do is delete the files I have picked up from the ftp site as I don't want to keep downloading the same files.
Once I have downloaded the files I need to rename them. Before the renaming process I have done an ls SGRD* > Myfile on the files I have downloaded and then run a loop to put delete in front of the file names.
Myfile contents
Is there anyway that I can run the commands within Myfile on the ftp server so that I just delete the files I downloaded ?
Another question I have is, is it possible to move the files that I have downloaded into a backup folder on the ftp server or do I have do download the files and upload them back to the ftp server ?
I tried rename in various different ways and it didn't work with multiple files.
I have a server that I have to ftp files off and they all start SGRD and are followed by 6 numbers.
Code:
SGRD000001
SGRD000002
SGRD000003
Once I have downloaded the files I need to rename them. Before the renaming process I have done an ls SGRD* > Myfile on the files I have downloaded and then run a loop to put delete in front of the file names.
Myfile contents
Code:
delete SGRD000001
delete SGRD000002
delete SGRD000003
Another question I have is, is it possible to move the files that I have downloaded into a backup folder on the ftp server or do I have do download the files and upload them back to the ftp server ?
I tried rename in various different ways and it didn't work with multiple files.