jerrycsakanyjr
asked on
Create ftp script from Directory Listing.
Hi, I am need to do a script file to delete remote files via ftp:
I want to use a directory listing as the base of the text file (called script.txt)
I will shell to a batch file (called logit.bat that does this):
CD "C:\scans\"
dir /B > script.txt
Now say the result of the batch is:
BELLE-16251KTX.TIF
BELLE-16051SCO.TIF
CG-76690BSR.TIF
CG-76690BHB.TIF
OA-2700USR.TIF
OA-2710KTX.TIF
I want to amend this script.txt file to have the necessary commands to delete the files on the remote server.
the end result of the script.txt file would be :
user bco passwd pArtner5
binary
DEL BELLE-16251KTX.TIF
DEL BELLE-16051SCO.TIF
DEL CG-76690BSR.TIF
DEL CG-76690BHB.TIF
DEL OA-2700USR.TIF
DEL OA-2710KTX.TIF
bye
I can handle the rest from here.
So basically i just need to know how to add the following to the top of the file:
user bco passwd pArtner5
binary
The following infront of the already existing lines:
DEL
The following at the very end of the file.
bye
I want to use a directory listing as the base of the text file (called script.txt)
I will shell to a batch file (called logit.bat that does this):
CD "C:\scans\"
dir /B > script.txt
Now say the result of the batch is:
BELLE-16251KTX.TIF
BELLE-16051SCO.TIF
CG-76690BSR.TIF
CG-76690BHB.TIF
OA-2700USR.TIF
OA-2710KTX.TIF
I want to amend this script.txt file to have the necessary commands to delete the files on the remote server.
the end result of the script.txt file would be :
user bco passwd pArtner5
binary
DEL BELLE-16251KTX.TIF
DEL BELLE-16051SCO.TIF
DEL CG-76690BSR.TIF
DEL CG-76690BHB.TIF
DEL OA-2700USR.TIF
DEL OA-2710KTX.TIF
bye
I can handle the rest from here.
So basically i just need to know how to add the following to the top of the file:
user bco passwd pArtner5
binary
The following infront of the already existing lines:
DEL
The following at the very end of the file.
bye
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You only need the file created?, or you need how to execute it via ftp in VB .NET?