Created
May 2, 2017 08:52
-
-
Save obelisk68/2fa50a2a2d990fc7abcc3aca762d97e1 to your computer and use it in GitHub Desktop.
Created by RubyPico at Tue May 02 17:52:20 2017
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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