I can make it work this way
Dir.chdir(basedir)
puts Dir.glob("#{filename}*").inspect
Is there any way to do so using only one command? I want to list
puts "#{csv_dir_name}\\#{testsuite}*"
puts Dir["#{csv_dir_name}\\#{testsuite}*"].inspect
retuns
C:\Program Files\TestPro\TestPro Automation Framework\Output Files\builds\basics\logs\basics\2011\07\07114100\login*
[]
on the other hand, this code works fine
Dir.chdir(csv_dir_name)
csv_file_name = Dir.glob("#{testsuite}*")
I think this should do what you want:
puts Dir["#{basedir}/#{filename}*"]
Or alternatively:
puts Dir["#{File.join(basedir, filename)}*"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With