1. DIR () & hidden things
- Posted by sergelli Sep 26, 2011
- 1464 views
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?
2. Re: DIR () & hidden things
- Posted by mattlewis (admin) Sep 26, 2011
- 1485 views
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
3. Re: DIR () & hidden things
- Posted by Euman_Overman Sep 27, 2011
- 1481 views
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
4. Re: DIR () & hidden things
- Posted by mattlewis (admin) Sep 27, 2011
- 1444 views
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
5. Re: DIR () & hidden things
- Posted by DerekParnell (admin) Sep 27, 2011
- 1419 views
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" },
6. Re: DIR () & hidden things
- Posted by sergelli Sep 27, 2011
- 1407 views
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
7. Re: DIR () & hidden things
- Posted by mattlewis (admin) Sep 27, 2011
- 1381 views
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?
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
8. Re: DIR () & hidden things
- Posted by sergelli Sep 27, 2011
- 1371 views
Does that actually work with the spaces like that?
failures were to write very fast. This is fixed!
9. Re: DIR () & hidden things
- Posted by sergelli Sep 27, 2011
- 1366 views
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.
10. Re: DIR () & hidden things
- Posted by Euman_Overman Sep 27, 2011
- 1375 views
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
11. Re: DIR () & hidden things
- Posted by euphoric (admin) Sep 27, 2011
- 1368 views
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).
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.
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" )
12. Re: DIR () & hidden things
- Posted by mattlewis (admin) Sep 27, 2011
- 1347 views
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
13. Re: DIR () & hidden things
- Posted by sergelli Sep 27, 2011
- 1354 views
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
14. Re: DIR () & hidden things
- Posted by jeremy (admin) Sep 27, 2011
- 1319 views
?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
Jeremy
15. Re: DIR () & hidden things
- Posted by gbonvehi Sep 27, 2011
- 1372 views
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
16. Re: DIR () & hidden things
- Posted by DerekParnell (admin) Sep 27, 2011
- 1311 views
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.
17. Re: DIR () & hidden things
- Posted by sergelli Sep 27, 2011
- 1285 views
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 ....
18. Re: DIR () & hidden things
- Posted by andi49 Sep 27, 2011
- 1353 views
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