1. Renaming a folder in Win32Lib

I am using Euphoria 3 still, with Judith's IDE and Win32Lib by almost everyone. I'm in XP SP3. I'm writing a program to vet my folder & file names for backup with Amazon, who don't like some characters that I can use OK.

Trouble is, I don't see how to rename a directory or folder. No CMD command, nothing in Win32Lib, so I wondered if one of you knowledgeable guys would know how to do it? Any ideas welcomed ...

new topic     » topic index » view message » categorize

2. Re: Renaming a folder in Win32Lib

AndyDrummond said...

I am using Euphoria 3 still, with Judith's IDE and Win32Lib by almost everyone. I'm in XP SP3. I'm writing a program to vet my folder & file names for backup with Amazon, who don't like some characters that I can use OK.

Trouble is, I don't see how to rename a directory or folder. No CMD command, nothing in Win32Lib, so I wondered if one of you knowledgeable guys would know how to do it? Any ideas welcomed ...

win32lib does have a function, but it is called moveFile, which can be used to move a file or folder to a new location on the same volume or to rename it. The return code is True if successful or False if it fails.

I have tried it (although on Euphoria version 4 and win32lib to match) and it does work on directories.

Arthur

new topic     » goto parent     » topic index » view message » categorize

3. Re: Renaming a folder in Win32Lib

ArthurCrump said...
AndyDrummond said...

I am using Euphoria 3 still, with Judith's IDE and Win32Lib by almost everyone. I'm in XP SP3. I'm writing a program to vet my folder & file names for backup with Amazon, who don't like some characters that I can use OK.

Trouble is, I don't see how to rename a directory or folder. No CMD command, nothing in Win32Lib, so I wondered if one of you knowledgeable guys would know how to do it? Any ideas welcomed ...

win32lib does have a function, but it is called moveFile, which can be used to move a file or folder to a new location on the same volume or to rename it. The return code is True if successful or False if it fails.

I have tried it (although on Euphoria version 4 and win32lib to match) and it does work on directories.

Arthur

Arthur, that is just what I was doing. It just returned False, a failure, however, so I looked at the docs and it said "File or files" so I assumed it was not relevant to folders. If you have it working, then I guess I have dropped one doing the job so I will return to the bug hunting phase. Many thanks.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Renaming a folder in Win32Lib

The Microsoft documentation does say it works on folders.
If you are renaming a folder in the current directory, no slashes are required.
In any case, do not terminate with a slash.

Arthur

new topic     » goto parent     » topic index » view message » categorize

5. Re: Renaming a folder in Win32Lib

ArthurCrump said...
AndyDrummond said...

I am using Euphoria 3 still, with Judith's IDE and Win32Lib by almost everyone. I'm in XP SP3. I'm writing a program to vet my folder & file names for backup with Amazon, who don't like some characters that I can use OK.

Trouble is, I don't see how to rename a directory or folder. No CMD command, nothing in Win32Lib, so I wondered if one of you knowledgeable guys would know how to do it? Any ideas welcomed ...

win32lib does have a function, but it is called moveFile, which can be used to move a file or folder to a new location on the same volume or to rename it. The return code is True if successful or False if it fails.

I have tried it (although on Euphoria version 4 and win32lib to match) and it does work on directories.

Arthur

I went through this before. I think Kat knew how to do it. But I cant find her solution. http://openeuphoria.org/forum/110650.wc#110650

Don Cole

new topic     » goto parent     » topic index » view message » categorize

6. Re: Renaming a folder in Win32Lib

dcole said...
ArthurCrump said...
AndyDrummond said...

I am using Euphoria 3 still, with Judith's IDE and Win32Lib by almost everyone. I'm in XP SP3. I'm writing a program to vet my folder & file names for backup with Amazon, who don't like some characters that I can use OK.

Trouble is, I don't see how to rename a directory or folder. No CMD command, nothing in Win32Lib, so I wondered if one of you knowledgeable guys would know how to do it? Any ideas welcomed ...

win32lib does have a function, but it is called moveFile, which can be used to move a file or folder to a new location on the same volume or to rename it. The return code is True if successful or False if it fails.

I have tried it (although on Euphoria version 4 and win32lib to match) and it does work on directories.

Arthur

I went through this before. I think Kat knew how to do it. But I cant find her solution. http://openeuphoria.org/forum/110650.wc#110650

Don Cole


I didn't use win32lib, i can never figure out which of the 100's of versions work with each application, since no one includes such files with their contributions.

I used and use a slightly modified WIN32FIL.EW by Jeffrey Fielding and mod'd by Brian Broker. It's been used in one app running on winxp SP1, SP2, SP3, Home and Pro editions, several times a day, since ~2003 (or before). The olde File.e (with getf() added) is also a great standard include.

useless

new topic     » goto parent     » topic index » view message » categorize

7. Re: Renaming a folder in Win32Lib

useless said...

I didn't use win32lib, i can never figure out which of the 100's of versions work with each application, since no one includes such files with their contributions.

I used and use a slightly modified WIN32FIL.EW by Jeffrey Fielding and mod'd by Brian Broker. It's been used in one app running on winxp SP1, SP2, SP3, Home and Pro editions, several times a day, since ~2003 (or before). The olde File.e (with getf() added) is also a great standard include.

useless

I have always used Win32Lib 0.70.4a, from Derek, I think, for some time now. But I agree there has been a problem with various additions and changes making it hard to find the "right" one. That's why I first published Judith's EuVIDE as a bound program - so it would run with whatever Win32Lib you had. Maybe one day .... ha!
Anyway, I found my error (not going to say what, too silly!) and renaming folders is indeed fine as stated.
When Eu4 gets truly solid - and the number of errors/queries coming up makes me think it isn't - we can all shift to that with a standard Eu4 Win32Lib and IDE maybe geared to Eu4. Till then, sorry, I use Eu3 'cos it just works.
Andy

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu