Author Topic: FILES statement alternative  (Read 6819 times)

0 Members and 1 Guest are viewing this topic.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
FILES statement alternative
« on: February 18, 2018, 08:18:51 am »
Hi all. This is program based on EoredsonĀ“s library demo program. Try it for selecting your MP3 files (or others, if you rewrite mask or all with *.*) in UNICODE path, use
MP3 files named with unicode characters. First run show __FILES$(mask$, 1) - this is for one file selecting. Second show __FILES$(mask$, 2) for multiple files selecting, then it return two arrays. Its all writed in the code. I think, this is best solution for QB64, now you need DIR not more. Test it, if it works good for you and write it here.
Use valid characters for drive switch, mutiple select can be from different drives and different paths. After is your multiple select completed, press Esc, program then print paths and selected files to screen and if you select MP3, are this files played.

First is __FILES$ run with ("*.*", 1) then as ("*.MP3", 2)

Code is added as attachment, is > than 20 kilobites.
* Erik-Petr-Files.bas (Filesize: 38.02 KB, Downloads: 558)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: FILES statement alternative
« Reply #1 on: February 18, 2018, 09:03:25 am »
Hi Petr,

Man that looks awful large for just a File Retriever but multi-files is good! I will check it out for that.

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: FILES statement alternative
« Reply #2 on: February 22, 2018, 01:16:29 am »
Sounds pretty cool, i'm running linux so I cant test it unfortunately.
I am from a Kazakhstan, we follow the hawk.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: FILES statement alternative
« Reply #3 on: February 22, 2018, 12:43:11 pm »
Hi Keybone, yes, its for windows only. Maybe try using WINE under linux for start it, but really i dont know if then it start.

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: FILES statement alternative
« Reply #4 on: February 23, 2018, 02:10:59 am »
Hi Keybone, yes, its for windows only. Maybe try using WINE under linux for start it, but really i dont know if then it start.

Of course it is.... Linux uses a different filesystem and commands because it is a different os.
It really shouldnt be too difficult to convert it to linux. maybe one day ill give it a try.
I am from a Kazakhstan, we follow the hawk.