March 29, 2024, 08:33:58 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Filenames including space characters are ignored - why?

Started by Egil, August 17, 2019, 05:03:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Egil

After a long break, I finally started coding again, and immediately ran into a mystery (at least for me!!).
Been working on a SWLlogbook program, and thought that it would be nice to have audio record/play possibilites included.

The program is now working, but still needs a lot of work before I can call it a proper program. And that is where the mystery came in. When trying to save captured audio using a file name with a space character included, the program won't save the file.
E.g. "Blue Hawaii" does not save but "Blue_Hawaii" does save. The same when trying to play such a file. If there is a space character included in the filename, the program ignores it.

Does anyone know how to work around this strange behaviour??

Almost forgot to tell: using "WINMM" for the audio parts.


Regards,
Egil.
Support Amateur Radio  -  Have a ham  for dinner!

aurelCB

Hi Egil
I am not sure but might be trick with chr$(34) like :

chr$(34) + filename_with_space_char + chr$(34)

do you can try that?

Egil

Hi Zlatko,

I did a couple of searches on the web, and found that putting spaces in filenames generates problems.
Many suggested solutions similar to yours, but none of them worked neither did yours.
So instead of doing a lot of work, maybe in vain, I decided to use underscores instead of spaces to make the filenames more readable.

Right now I record files with names such as:  "6085_20190817_1733.wav", which means that the recording was made of a transmission on 6085 kHz at UTC date and time.(today at 1733 UTC).

I choose to use "Winmm" since this makes it easy to play booth WAV amd MP3 files. So the next obvious step will be to convert the WAV recordings to MP3 using the LAME audio library. I have never done that before, so reckon I have lot to learn.

Thanks for trying anyway.


Regards,
Egil


PS
I have a very crude, working version of the recorder/player for CB, but there are still many details to do before the program is complete. But in case anyone wants to play around with the finished code, I'll post what I already have.

Support Amateur Radio  -  Have a ham  for dinner!

Rock Ridge Farm (Larry)

Command line processors use space/tab as a separator. It is how they break up arguments.

Larry

Egil

Thanks Larry!

Becoming rather rusty here, shuld have thought about that myself...


Egil
Support Amateur Radio  -  Have a ham  for dinner!