1. DIR () & hidden things

Really "DIR()" does not work with hidden folders in WIN7. Does not work using the routine DIR () of Euman. and also does not work if you're using the Euphoria 4.0.3

Maybe a lot has changed in the Windows platform and there are new things that do not work with Euphoria.

For example: Using "DIR C:\" in the prompt's Windows console, the folder "Documents and Settings" does not appear as <DIR>, but appears as <JUNCTION>

I still do not know how to list hidden files and folders on Win7

Does anyone know anything about it?

new topic     » topic index » view message » categorize

2. Re: DIR () & hidden things

sergelli said...

Really "DIR()" does not work with hidden folders in WIN7. Does not work using the routine DIR () of Euman. and also does not work if you're using the Euphoria 4.0.3

Maybe a lot has changed in the Windows platform and there are new things that do not work with Euphoria.

For example: Using "DIR C:\" in the prompt's Windows console, the folder "Documents and Settings" does not appear as <DIR>, but appears as <JUNCTION>

I still do not know how to list hidden files and folders on Win7

Does anyone know anything about it?

I don't recall how it was implemented before v4, but on Windows, we use the standard Windows API: FindFirstFile and FindNextFile.

I don't know what these do with things like junctions or reparse points, but the data structures seem to have stuff about them, so I'd guess that it's able to deal with them. Can you be more specific about what exactly you're doing? By this, I mean, please give more details about the hidden folder, and how you're calling dir() so that it appears to fail.

Matt

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

3. Re: DIR () & hidden things

Hey,

I dont have win 7 atm please turn trace on dir2(), all of the api is there todo what you need, it's probably something other than 'rashd' on that directory is what Im thinking.

you could also grab the free file mananger demo I wrote which is the graphical for dir2(), if you run the program and the directory shows up properly get back to me .. I'll also take a look at making that code alittle less messy .. lol

this is the graphical for that dir2() ~ http://www.rapideuphoria.com/effm2.zip

Euman

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

4. Re: DIR () & hidden things

Euman_Overman said...

I dont have win 7 atm please turn trace on dir2(), all of the api is there todo what you need, it's probably something other than 'rashd' on that directory is what Im thinking.

you could also grab the free file mananger demo I wrote which is the graphical for dir2(), if you run the program and the directory shows up properly get back to me .. I'll also take a look at making that code alittle less messy .. lol

this is the graphical for that dir2() ~ http://www.rapideuphoria.com/effm2.zip

Looking at the code, it seems to be doing the same thing as euphoria v4 does in the back end when the user calls dir() on Windows. Using this code would be a great way to figure out what's going on using euphoria (and so more accessible).

Matt

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

5. Re: DIR () & hidden things

sergelli said...

Really "DIR()" does not work with hidden folders in WIN7.

I am running Win7 and using Eu4.0.4 (compiled with MingW). It works just fine for me. Here is what I get for the 'Documents and Settings' folder ...

  { 
    "Documents and Settings", 
    "hsdNR", 
    0, 
    2009, 
    7, 
    14, 
    14, 
    53, 
    55, 
    548, 
    "DOCUME~1" 
  }, 
new topic     » goto parent     » topic index » view message » categorize

6. Re: DIR () & hidden things

mattlewis said...

Can you be more specific about what exactly you're doing? By this, I mean, please give more details about the hidden folder, and how you're calling dir() so that it appears to fail.

The main use I make of dir () is below:

object dirs 
dirs = "C:\\" 
dirs = dir(dirs) - 
if sequence (dirs) 
  - Do Anything 
else 
end if 

This code is very simple to give problems with the way it is used.

What is really happening is that I do not know much about Win7.

I did not know that Bill Gates has created a new way of looking at the folder "Documents and Settings". In fact, this folder no longer exists and no matter what you try to view it, it will not be able to see it with the dir() function. Although it appears when we execut on Windows "DIR / AH C:\" or when accessing the folder "C:\" with WinExplorer

In short, the Euphoria language, still good and efficient as ever. Who changed was the Windows platform, which is doing WinExplorer display folders that do not exist.

So, I think that this post is solved Very grateful to all

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

7. Re: DIR () & hidden things

sergelli said...
mattlewis said...

Can you be more specific about what exactly you're doing? By this, I mean, please give more details about the hidden folder, and how you're calling dir() so that it appears to fail.

The main use I make of dir () is below:

object dirs 
dirs = "C: \ \" 
dir2 = dirs (dirs) - 
if sequence (right) 
  - Do Anything 
else 
end if 

This code is very simple to give problems with the way it is used.

Does that actually work with the spaces like that?

sergelli said...

What is really happening is that I do not know much about Win7.

No problem. A lot of stuff has changed, and debugging is always easier once you understand more context.

Matt

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

8. Re: DIR () & hidden things

mattlewis said...

Does that actually work with the spaces like that?

failures were to write very fast. This is fixed!

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

9. Re: DIR () & hidden things

DerekParnell said...

I am running Win7 and using Eu4.0.4 (compiled with MingW). It works just fine for me. Here is what I get for the 'Documents and Settings' folder ...

I do not understand. Where can I get the version Eu4.0.4?

Because with Win7 and Eu4.0.3, the result is -1

xx = dir ("c: \ \ Documents and Settings") 

I also affirm that, in my PC, there is nothing into this "folder" (is it a folder?) Currently,in my Win7, the users' folders are in the folder "c:\\users" rather than in "C:\\Documents and Settings", as it was in winxp.

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

10. Re: DIR () & hidden things

I'll make sure this gets fixed in my version of dir() by next week as I should be back home from work possibly having time to extend the routine aswell just for win 7. Euman

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

11. Re: DIR () & hidden things

sergelli said...

I do not understand. Where can I get the version Eu4.0.4?

It's available from the Mercurial repo (see SCM link at right under Misc Menu).

sergelli said...

Because with Win7 and Eu4.0.3, the result is -1

xx = dir ("c:\\Documents and Settings") 

If you get -1, you can safely assume that the path you've specified does not exist. If you get an unexpected result, confirm that 1) the path you specified is valid, or 2) the path exists.

sergelli said...

I also affirm that, in my PC, there is nothing into this "folder" (is it a folder?) Currently,in my Win7, the users' folders are in the folder "c:\\users" rather than in "C:\\Documents and Settings", as it was in winxp.

So what does this give you:

?dir( "c:\\users" ) 
?dir( "c:\\Documents and Settings" ) 
new topic     » goto parent     » topic index » view message » categorize

12. Re: DIR () & hidden things

sergelli said...
DerekParnell said...

I am running Win7 and using Eu4.0.4 (compiled with MingW). It works just fine for me. Here is what I get for the 'Documents and Settings' folder ...

I do not understand. Where can I get the version Eu4.0.4?

I believe that Derek is talking about building the latest version in development. 4.0.4 has not been released yet.

Matt

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

13. Re: DIR () & hidden things

euphoric said...

So what does this give you:

?dir( "c:\\users") 
?dir( "c:\\Documents and Settings" ) 
?dir( "c:\\users") 
 

in this case, displays a list of items that exist in the folder

?dir( "c:\\Documents and Settings" ) 

display -1

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

14. Re: DIR () & hidden things

sergelli said...
?dir( "c:\\users") 
 

in this case, displays a list of items that exist in the folder

?dir( "c:\\Documents and Settings" ) 

display -1

BTW... In Euphoria 4.x we have a few new string types. One could rewrite this code to be:

-- backquotes 
?dir(`c:\users`) 
 
-- tripple quote 
?dir("""c:\Documents and Settings""") 

both of those strings are considered "raw" strings and can also span multiple lines, although that would for sure cause a -1 with the dir() example above smile

Jeremy

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

15. Re: DIR () & hidden things

Windows 7 (and I don't remember Vista) has this kind of softlinks ala Linux and IIRC they are called junctions. "Documents and settings" does not exists as it is, it's just a symlink to Users This is a console output from Windows 7.

C:\>dir "Documents and Settings" 
 Volume in drive C has no label. 
 Volume Serial Number is 88C7-590C 
 
 Directory of C:\Documents and Settings 
 
File Not Found 
 
C:\>cd "Documents and Settings" 
 
C:\Documents and Settings> 

Edit: You should use something like %USERPROFILE% if you're looking for the current OS user folder. Take a look here: http://vlaurie.com/computers2/Articles/environment.htm for XP like OS
And here for 7: http://vlaurie.com/computers2/Articles/environment-variables-windows-vista-7.htm

Edit2: You can still see it using /a

C:\Documents and Settings>cd .. 
 
C:\>dir 
 Volume in drive C has no label. 
 Volume Serial Number is 88C7-590C 
 
 Directory of C:\ 
 
15/09/2011  04:26 p.m.             1.024 .rnd 
10/06/2009  06:42 p.m.                24 autoexec.bat 
10/06/2009  06:42 p.m.                10 config.sys 
22/09/2011  01:41 a.m.    <DIR>          Downloads 
21/02/2011  04:12 a.m.    <DIR>          NVIDIA 
13/07/2009  11:37 p.m.    <DIR>          PerfLogs 
09/05/2011  06:32 p.m.    <DIR>          Prey 
15/09/2011  04:26 p.m.    <DIR>          Program Files 
28/12/2009  01:47 p.m.             1.679 RHDSetup.log 
01/12/2010  04:48 p.m.    <DIR>          totalcmd 
30/11/2010  05:34 p.m.    <DIR>          Users 
19/09/2011  11:05 a.m.    <DIR>          Windows 
               4 File(s)          2.737 bytes 
               8 Dir(s)  34.967.805.952 bytes free 
 
C:\>dir /a 
 Volume in drive C has no label. 
 Volume Serial Number is 88C7-590C 
 
 Directory of C:\ 
 
30/11/2010  05:45 p.m.    <DIR>          $Recycle.Bin 
15/09/2011  04:26 p.m.             1.024 .rnd 
10/06/2009  06:42 p.m.                24 autoexec.bat 
23/02/2011  05:22 p.m.    <DIR>          Boot 
20/11/2010  09:40 a.m.           383.786 bootmgr 
10/06/2009  06:42 p.m.                10 config.sys 
14/07/2009  01:53 a.m.    <JUNCTION>     Documents and Settings [C:\Users] 
22/09/2011  01:41 a.m.    <DIR>          Downloads 
25/09/2011  08:52 p.m.     1.408.638.976 hiberfil.sys 
28/12/2009  12:32 p.m.    <DIR>          MSOCache 
21/02/2011  04:12 a.m.    <DIR>          NVIDIA 
25/09/2011  08:52 p.m.     1.878.188.032 pagefile.sys 
13/07/2009  11:37 p.m.    <DIR>          PerfLogs 
09/05/2011  06:32 p.m.    <DIR>          Prey 
15/09/2011  04:26 p.m.    <DIR>          Program Files 
21/09/2011  12:10 a.m.    <DIR>          ProgramData 
30/11/2010  05:32 p.m.    <DIR>          Recovery 
28/12/2009  01:47 p.m.             1.679 RHDSetup.log 
27/09/2011  05:08 p.m.    <DIR>          System Volume Information 
01/12/2010  04:48 p.m.    <DIR>          totalcmd 
30/11/2010  05:34 p.m.    <DIR>          Users 
19/09/2011  11:05 a.m.    <DIR>          Windows 
               7 File(s)  3.287.213.531 bytes 
              15 Dir(s)  34.967.805.952 bytes free 
 
C:\> 
Cheers, Guillermo

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

16. Re: DIR () & hidden things

sergelli said...

Because with Win7 and Eu4.0.3, the result is -1

There does seem to be a problem with dir() when the parameter given to it is a junction rather than a file or folder. I'll see if we can do something about that.

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

17. Re: DIR () & hidden things

DerekParnell said...

There does seem to be a problem with dir() when the parameter given to it is a junction rather than a file or folder. I'll see if we can do something about that.

Yes, this is the bottom line .... Bill Gates is using "folders", "files" and now uses "junctions" and the latter will provide work for all of us ....

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

18. Re: DIR () & hidden things

Hallo

maybe http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418%28v=vs.85%29.aspx and http://msdn.microsoft.com/en-us/library/windows/desktop/aa365740%28v=vs.85%29.aspx

gives some information on Junctions. But I'am not sure how to handle this. Junctions seems to be something between hardlinks and softlinks (*.lnk).

Mean i have read this http://msdn.microsoft.com/en-us/library/aa365006%28VS.85%29.aspx but i didn't understand it.

Andreas

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

Search



Quick Links

User menu

Not signed in.

Misc Menu