I have a situation where I need to delete multiple files from a folder once I connect to FTP server. I am using ftp script to get the files, number of files always vary from 1 to 100. once I get the files I need to delete all the files downloaded I am making a list of all the files downloaded and store in a variable so at the end when I am ready to delete files my variable will have all the names of files to be deleted like....
I am using a command del ${VAR_FILES_DELETE} this is not working it is just deleting file1 why is it not deleting all the files...?
or is it a limitation that we can delete only one file at a time...?
is there any other way to delete multiple files once I get connected to FTP...?
Please help.
Thanks,
Last edited by rbatte1; 06-15-2017 at 07:03 AM..
Reason: Added CODE & ICODE tags
Hi guys...
I'm working on #!/bin/sh script in a Solaris 7 box that should send several files over to another machine via FTP. Here's what the script looks like:
# This script will send the daily MSP customer counts
# to the Crystal Reports server located at 192.168.2.106
cd... (2 Replies)
Hi,
I have to write a ftp script which transfers multiple files from one unix server to another. When I try to transfer single file it goes through successfully. But, When I try to do multiple files none of the files get ftp'd. And also, even the single file goes transferred successfully, I... (4 Replies)
I have a directory full of text data files.
Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application.
I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Hi,
I'm quite new to unix and perl scripting and need to write a script to delete files older than 7 days from a remote ftp server. Unix or Perl script would do...
I wrote the following code:
#!/usr/local/bin/perl
use File::Basename;
use Net::FTP;
#use Net::FTP::File;
my $verbose =... (15 Replies)
Hi,
I have a directory that contains say 100 files named sequencially like input_1.25_50_C1.txt
input_1.25_50_C2.txt
input_1.25_50_C3.txt
input_1.25_50_C4.txt
..
..
..
input_1.25_50_C100.txt
an example of the content in each of the file is:
"NAME" "MEM.SHIP"
"cgd1_10" "cgd1_10"... (9 Replies)
My website has been hacked and i need to remove a lot of unique files with same content. The files have very similar code:
eval(base64_decodeHow do i find multiple/all the files with the above code and remove them?
Thanks. (10 Replies)
I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure..
./dir1/1/TRADE_LOG*.gz
./dir2/10/TRADE_LOG*.gz
./dir11/12/TRADE_LOG*.gz
./dir12/13/TRADE_LOG*.gz
when I do ftp uisng mput from the "." dir I am getting the below given error
mput... (1 Reply)
I'm baffled..... the system I work on creates files every Mon-Friday
I'm trying to delete all files older than 30 days old from a Unix prompt, the command I'm using is:
find /directory/ -mtime +30 -exec rm {} \;
however it returns /directory/filename: 644 mode ? (y/n) for every file! ... (1 Reply)
Hi All,
i am doing ftp
how can i transfer multiple different files
example-
03-21-13 06:33AM 46800 CATT_HOURS.pgp
03-21-13 06:33AM 266392 CATT_TAX.txt
03-21-13 06:33AM 91448 CATT_STATUS.txt
03-21-13 06:33AM 468 ... (3 Replies)
Hello,
I have a server that I have to ftp files off and they all start SGRD and are followed by 6 numbers.
SGRD000001
SGRD000002
SGRD000003
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... (7 Replies)
Discussion started by: sph90457
7 Replies
LEARN ABOUT DEBIAN
wdel
wdel(1) Internet Applications - FTP wdel(1)NAME
wdel - A wget-like program for deleting files on ftp servers
SYNOPSIS
wdel [option]... [URL [file]...]...
DESCRIPTION
Wdel is a free utility that is able to delete files on an ftp server.
Wdel is non-interactive and background-capable. It can delete files or whole directories and is meant to be a robust client even for unsta-
ble connections and will therefore retry to delete a file, if the connection broke.
Wdel supports connections through proxies, allowing you to use it in an environment that can access the internet only via a proxy or to
provide anonymity by hiding your ip-address to the server. For SOCKSv5-proxies Wdel supports also listening mode, allowing you to use
port-mode ftp through a proxy (useful if the remote ftp is behind a firewall or a gateway).
URL-Input-Handling
URLs are recognized by the ftp://-prefix.
Wdel first reads the URLs from the command line, and associates every file with the last URL until a new URL is found (note that this is
different from wput). Then, it reads the --input-file (if any) and parses the URLs in the same way. So you can specify e.g. one URL and
read all filenames from a file.
If there are no explicit filenames given for a singe URL, then the last part of the URL is taken to be the file/directory to be deleted. If
there are filenames, then the last part of the URL is considered to be the directory where these files reside in. Slashes at the end of the
URL or the filename (in case it is a directory to be deleted) are ignored.
OPTIONS
There are no special options introduced by Wdel. All of Wput's options may be supplied, although some will not be of any effect because
they do not apply for the process of deleting files. Please see wput(1) for a description of the options.
SEE ALSO
Many options can be set in a wputrc file. For its documentation consult the sample file provided by Wput.
wput(1) describes all setable options. Not all apply for wdel too though.
AUTHOR
Wdel is written by Hagen Fritsch <fritsch+wdel-man@in.tum.de> and Jan Larres <jan@majutsushi.net>
Hagen Fritsch, Jan Larres 0.6.2 wdel(1)