Created
July 29, 2012 08:56
-
-
Save aturgarg/3196826 to your computer and use it in GitHub Desktop.
file listing in directory
This file contains hidden or 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
#files listing in a directory and write it to a file | |
ARGV.each do|a| | |
puts "Directory: #{a}" | |
dir_contents = Dir.entries(a) | |
puts dir_contents | |
end | |
#usage | |
#at cmd | |
#> ruby files.rb foldername > folderfiles.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment