Skip to content

Instantly share code, notes, and snippets.

@obelisk68
Created May 2, 2017 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obelisk68/2fa50a2a2d990fc7abcc3aca762d97e1 to your computer and use it in GitHub Desktop.
Save obelisk68/2fa50a2a2d990fc7abcc3aca762d97e1 to your computer and use it in GitHub Desktop.
Created by RubyPico at Tue May 02 17:52:20 2017
def main
fname = Popup.input("削除するファイル名かフォルダ名")
if not File.exist?(fname)
puts "ファイルまたはフォルダが存在していません"
return
elsif File.file?(fname)
File.delete(fname)
else
Dir.rmdir(fname)
end
puts "Delete #{fname}"
end
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment