How does juce represent drive c?

I have a juce::String c:\temp, however, I use this string as argument in other function _chdir(), _chdir() can not recognize the drive c: .
So how to represent drive c in juce string?


…sorry, that sounds extremely muddled, I’m really not sure what you’re asking?

try toUTF8() method, that worked for me when pasing JUCE strings to curl calls.

Hi, Everyone
I may not state clearly.Please forget about what I posted before.
I describe the scenario.

When I use File::moveFileTo(), I have a original file at

I set this path as juce::String, oldPath

and I have a destination at

c:\Users\leon\Song\song1.wav, and I want to move and rename track1.wav to song1.wav.
I set this path as juce::String , newPath

I use the moveFileTo() method as follows:

juce::File oldFile(oldFile);
juce::File newFile(newPath);
This should move to the oldFile to desired location , and rename
it to song1.wav.
However, it moved the oldFile to

C:\Users\leon\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\leon\Song\song1.wav.

I thought the reason is juce does not recognize the C drive, and append it to the default directory.

I asked whether juce need some special process of Drive, not just put it in the string.


distination path and orignial path are right in my code, we use moveFileTo with right args, and this method returns true for success, however, the orginal file is still moved to the default place.

I wrote wrong . juce::File oldFile(oldFile) should be
juce::File oldFile(oldPath);

I’ve been using moveFileTo() happily with no problems for a long time, so very much doubt if it’s a bug. Looks to me like what you’ve done is just to give it a destination string that is “c\users\etc” without the “:”, so you should check that the strings are actually what you expect them to be.