Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / and this is logical how?

Author
Message
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 11th Jul 2005 15:38 Edited at: 11th Jul 2005 15:49
here is some code that will bogle at your mind


can anyone explain this(i know the reaosn just wondering who else does)

hmm makes me wonder what is in the file

btw i think this works only on ntfs

edit:
also does this with the filename "nul"

n00bs will be shot on spot...
It only gets more logical from here(sigh)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Jul 2005 20:22
I assume that it's an un-deleteable file

Windows either re-spawns it, or simply doesn't allow you to delete it

Hurrah!

Team EOD :: All-Round Nice Guy
Want Better dbHelp Files?
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 11th Jul 2005 21:48
Or it could just be an internal Windows label, not a file at all (i.e. not something you can ever delete) - just like the old PTR1, etc. Change aux for prn and it starts messing with the printer, etc.

A great many people think they are thinking when they are really rearranging their prejudices.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jul 2005 22:43
AUX is a DOS device. IIRC, it was the device that referred to the keyboard and monitor.

You'll also have the same problem with CON, SER, PAR and NUL ... probably a few others I've forgotten too.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 11th Jul 2005 23:41
If you want to check if a file exists, you have to add the extension. But if you want to check a path, use path exist().

Immunity and Annihalation makes Immunihalation...
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 12th Jul 2005 01:34
would this print to lpt1
then ianm


n00bs will be shot on spot...
It only gets more logical from here(sigh)
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Jul 2005 00:34
That code wont, but this should :



George "Dubya" Bush says: 'I play AtomZ to keep my brain supple. Here it found be:http://www.nichkk.plus.com/'
http://spaces.msn.com/members/BouncyBrick/
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 14th Jul 2005 00:37
YEA!
who needs tpcs
lol

n00bs will be shot on spot...
It only gets more logical from here(sigh)
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 14th Jul 2005 00:43
I havnt got a printer here, Does that actualy print?

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 14th Jul 2005 01:02
Haha... No this will print a line of text in a file

Immunity and Annihalation makes Immunihalation...
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Jul 2005 01:28
Quote: " Haha... No this will print a line of text in a file"

No, it should print to printer 1 (the default printer attached to the computer - unless your using a networked one). I'll make sure when I get back home.

Unfortunately, if you dont have a printer connected, its liable to crash the program - unfortunately thats the case with any language that uses LPT1 (its okay with LPT2 - 9 though).

George "Dubya" Bush says: 'I play AtomZ to keep my brain supple. Here it found be:http://www.nichkk.plus.com/'
http://spaces.msn.com/members/BouncyBrick/
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 14th Jul 2005 01:33
Then why doesn't it work with me?

Immunity and Annihalation makes Immunihalation...
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th Jul 2005 02:44
Cant say - probably the OS is preventing it.

George "Dubya" Bush says: 'I play AtomZ to keep my brain supple. Here it found be:http://www.nichkk.plus.com/'
http://spaces.msn.com/members/BouncyBrick/
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 14th Jul 2005 15:20
dumb protection
ahh well its for the better though as programs could try interfering with the print spooler/by passing it

n00bs will be shot on spot...
It only gets more logical from here(sigh)

Login to post a reply

Server time is: 2024-11-23 10:35:06
Your offset time is: 2024-11-23 10:35:06