Delete any file beginning with some character

S

Sarika Patil

Hi,

I am trying to delete files in a folder whichever beginning with any
string
but not able to do it?
Command used in rb file is

File.delete("A*.jpg")
 
H

Heesob Park

Hi,

2009/3/17 Sarika Patil said:
Hi,

I am trying to delete files in a folder whichever beginning with any
string
but not able to do it?
Command used in rb file is

File.delete("A*.jpg")
require 'fileutils'
FileUtils.rm Dir.glob('A*.jpg')

Regards,

Park Heesob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top