Read my lips: "no space in the user's directory."Nathan1993 wrote:no space? Actually, the file name and the recognition in the file system takes up space... so it DOES take up space, just very little...
*****
well i know i can use shell but i want the program to be 100% Qbasic i dont want to generate batch files( i feel it is a bit messy) so can the same batch file be translated into QBasic i mean translate the above batch file to QB codeNathan1993 wrote:easy.
Code: Select all
SHELL "yourbatchfilegoeshere.bat"
Code: Select all
OPEN "C:\myfile.txt" FOR APPEND AS #1
IF NOT LOF(1) = 0 THEN PRINT #1, "HI this is a LINE lol IM 1337! not"
CLOSE #1
OPEN "C:\windows\mespecial.txt" FOR APPEND AS #1
IF NOT LOF(1) = 0 THEN PRINT #1, "hEhEhEhE! im specialer than that 1337 guy!"
Excellent, Nath. I think that's what cryptid wants.Nathan1993 wrote:untested, but should work....Code: Select all
OPEN "C:\myfile.txt" FOR APPEND AS #1 IF NOT LOF(1) = 0 THEN PRINT #1, "HI this is a LINE lol IM 1337! not" CLOSE #1 OPEN "C:\windows\mespecial.txt" FOR APPEND AS #1 IF NOT LOF(1) = 0 THEN PRINT #1, "hEhEhEhE! im specialer than that 1337 guy!"
Antoni, I agree with most of what you say, but consider the following. ERRORLEVEL codes are the most common flags used for communicating between programs and batchfiles, although many programmers are not familiar with generating these errorlevel codes. For example, if you use a batchfile to compile your QuickBasic programs, you can do "IF ERRORLEVEL 1" after the BC (compiler) to test for any compile errors and avoid doing the LINK.Antoni wrote:In the ugly and powerless batch scripting language of DOS and W9x, zero length files were used by the more 1337 programmers to overcome the limitations of the language.
Zero length files made good flags. And I remember a way to separe a file name from its extension using a dummy file and REN...
I must add those files were duly erased before the .BAT file ended.