M
Mmcolli00 Mom
When I output to line for RegisteredUser it shows all filenames as nil
for all but the files. What can I change to show only the filename
meeting the conditions?
Thanks, MC
outputs....
nil
nil
nil
nil
AUR123443.txt
Dir.entries(ascpath).each do |filename|
if filename =~ /^AU/ then
if filename[2..2] == "R" then
RegisteredUser = filename
else
NonRegisteredUser = filename
end
end
#below shows nil for all files and then shows the registereduser file.
puts RegisteredUser
end
for all but the files. What can I change to show only the filename
meeting the conditions?
Thanks, MC
outputs....
nil
nil
nil
nil
AUR123443.txt
Dir.entries(ascpath).each do |filename|
if filename =~ /^AU/ then
if filename[2..2] == "R" then
RegisteredUser = filename
else
NonRegisteredUser = filename
end
end
#below shows nil for all files and then shows the registereduser file.
puts RegisteredUser
end