From: Fengfeng Li Date: 2010-11-25T11:13:19+09:00 Subject: Re: system() or process.create? Charles Roper wrote in post #963646: > Del is part of cmd.exe, which is possibly why Process.create is not > working. Have a look here: > > http://www.computerhope.com/cmd.htm > http://www.computerhope.com/delhlp.htm > > You could try something like Process.create('cmd.exe /c del *.zip') > > Alternatively, why not use FileUtils.rm to delete files? Like this: > > FileUtils.rm Dir.glob('*.zip') > > Docs: http://ruby-doc.org/core/classes/FileUtils.html#M004332 > > Charles Thanks for your help, both 'cmd.exe /c del *.zip' and FileUtils.rm Dir.glob('*.zip') can solve my problem^^ -- Posted via http://www.ruby-forum.com/.