• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 883
  • Last Modified:

delete remote files with wild card

 $ftp->delete("*.old");

*.old: The filename, directory name, or volume label syntax is incorrect.
0
matgold
Asked:
matgold
1 Solution
 
ZiaTioNCommented:
You cannot really use wild cards so probably the easiest way to do this would be the following:

my @files = $ftp->ls();
for (@files) { $ftp->delete("$_") if (/\.old$/); }
0
 
matgoldAuthor Commented:
ok I was hoping that I could.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now