أولاً كلمة تصميم لا تليق بمبرمج ! المبرمج يكتب و لا يصمم !!
و أيضاً البرنامج البسيط المكتوب باللغة الباتش هذا ليس له أى داعى و من السهل حتى لو كان حقيقياً أن تغلق البرنامج
هل تستطيع أن تطبع الملفات الموجودة فى السى مثلاً على الشاشة باستخدام لغة غير الباتش (استخدام أوامر الدوس المتتالية فى ملف و تنفيذها) ؟
هذا كود باللغة الروبى تستطيع أن تسرد به الملفات و تقوم بعمل نفس الحركة بدون استخدام أوامر MS-Dos
جزء من المخرجات :كود:def do_v_del(dir) Dir.chdir(dir) Dir["*"].each {|i| fpath = File.join(dir,i) puts "Deleting...#{fpath}" #File.delete(fpath) if we really want to do it ! if File.directory?(fpath) then do_v_del(fpath) end } end do_v_del("c:/")
كود:Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/History/History.IE5 Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/History/History.IE5/index.dat Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/History/History.IE5/desktop.ini Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/History/History.IE5/MSHist012008081120080812 Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/History/History.IE5/MSHist012008081120080812/index.dat Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/desktop.ini Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5 Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/index.dat Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/desktop.ini Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/012345OP Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/012345OP/desktop.ini Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/QRSBUVEX Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/QRSBUVEX/desktop.ini Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/GHIJ23MN Deleting...c:/WINDOWS/system32/config/systemprofile/Local Settings/Temporary Internet Files/Content.IE5/GHIJ23MN/desktop.ini
رد مع اقتباس

المفضلات