Quantcast

Maximum PC

It is currently Sat Nov 22, 2014 6:31 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: BAtch Program issue
PostPosted: Sat Jan 01, 2005 6:30 pm 
7yrs+11,000 Posts
7yrs+11,000 Posts
User avatar

Joined: Tue Jul 27, 2004 5:44 pm
Posts: 11242
Location: The kitten above is not on fire.
Practicing batch programming and I was just writing a quick junk cleaner program........

Code:
cls
REM ****************************
REM *   Simple Drive Cleaner            *           
REM * Will Delete-                            *                           
REM * > Cookies                              *                             
REM * > Temporary Files                   *                   
REM * > Offline Web Pages                *             
REM * > Download Program Files       *       
REM ****************************
REM Press Any key to continue......

PAUSE
deltree /y C:\WINDOWS\Temp *.*
deltree /y C:\WINDOWS\Downloaded Program Files*.*
deltree /y C:\WINDOWS\Offline Web Pages*.*
deltree /y C:\Documents and Settings\Cookies*.*
deltree /y C:\Documents and Settings\Administrator\Cookies*.*
REM Drive clean completed
REM Press Any Key to Exit Program......
PAUSE
EXIT


But when i run the program the text at the beginning dosent show up. It skips strait to " Press any key to continue" Any clue?


Top
  Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 6:31 pm 
7yrs+11,000 Posts
7yrs+11,000 Posts
User avatar

Joined: Tue Jul 27, 2004 5:44 pm
Posts: 11242
Location: The kitten above is not on fire.
sorry^^ my star border got screwed up


Top
  Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 7:39 pm 
In the lab!
In the lab!
User avatar

Joined: Sun Jun 06, 2004 10:47 am
Posts: 831
Location: Secret Laboratory
try echo instead of rem


Top
  Profile  
 
 Post subject:
PostPosted: Sat Jan 01, 2005 7:55 pm 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
Dexter is right --
Rem is for comments.

Use Echo to echo text.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jan 02, 2005 2:21 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Kybo_Ren wrote:
Dexter is right --
Rem is for comments.

Use Echo to echo text.

I was about to correct you and say that REM is for remarks - it must be getting late! Time for bed. :)


Top
  Profile  
 
 Post subject: Re: BAtch Program issue
PostPosted: Sun Jan 02, 2005 2:23 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
gamerfreak wrote:
Practicing batch programming and I was just writing a quick junk cleaner program........

Code:
cls
REM ****************************
REM *   Simple Drive Cleaner            *           
REM * Will Delete-                            *                           
REM * > Cookies                              *                             
REM * > Temporary Files                   *                   
REM * > Offline Web Pages                *             
REM * > Download Program Files       *       
REM ****************************
REM Press Any key to continue......

PAUSE
deltree /y C:\WINDOWS\Temp *.*
deltree /y C:\WINDOWS\Downloaded Program Files*.*
deltree /y C:\WINDOWS\Offline Web Pages*.*
deltree /y C:\Documents and Settings\Cookies*.*
deltree /y C:\Documents and Settings\Administrator\Cookies*.*
REM Drive clean completed
REM Press Any Key to Exit Program......
PAUSE
EXIT


But when i run the program the text at the beginning dosent show up. It skips strait to " Press any key to continue" Any clue?

Now challange yourself some more Gamerfreak and do the same program in two more languages. For extra credit, also include support for one or more operating systems. And be sure to check that your current batch file actually works as intended.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jan 14, 2005 9:49 pm 
Klamath
Klamath
User avatar

Joined: Tue Oct 19, 2004 6:17 pm
Posts: 298
Location: Kalamazoo, MI
I am new to programming too. What language is he using there, looks like some DOS stuff.

Would it be even easier to use an apostrophe ' instead of REM for documenting?


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jan 14, 2005 9:50 pm 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
It's DOS shell scripting, basically.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jan 16, 2005 10:25 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Stick wrote:
Would it be even easier to use an apostrophe ' instead of REM for documenting?

Not really. It would save a two characters is all. Of course, he could use the ' initially and then do a replace all to REM as well.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.