Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 01-01-2007, 10:25 AM   #11 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

Yes so to make another line in the file i would add another line for example
echo Line 1>> %systemdrive%\cleanit.bat
echo Line 2 >> %systemdrive%\cleanit.bat

???? or am i not getting it
Yek is offline  
Old 01-01-2007, 10:26 AM   #12 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

Ah i get it , first line is just making a new file so needs to overwrite everthing (one >) second line its just adding to it so needs two >> , am i right ??
Yek is offline  
Old 01-01-2007, 11:11 AM   #13 (permalink)
 
Newb Techie

Join Date: Dec 2006

Posts: 21

Stormdev

Default

That is correct.



Quote:
Originally posted by Tkey
Also i see that the file is created on the systemdrive first , can you create it in the /start menu/... directory first rather than moving it?? (why you want to do this i wouldnt know but just for future refrence )
You can create the file wherever you like providing there are no policies in place preventing it. Back in DOS I used to create new batch files in the root of the primary drive quite a bit, therefore if an error arose in the file creation or an operation of some sort it was clear exactly where the file(s) were sitting etc...

Force of habit I suppose... lol
Stormdev is offline  
Old 01-02-2007, 06:13 AM   #14 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

Thanks for your help
Yek is offline  
Old 01-02-2007, 06:17 AM   #15 (permalink)
 
Newb Techie

Join Date: Dec 2006

Posts: 21

Stormdev

Default

Your very welcome, glad I could contribute.
Stormdev is offline  
Old 01-02-2007, 07:29 AM   #16 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

even with you habits hehe
Yek is offline  
Old 01-02-2007, 07:32 AM   #17 (permalink)
 
Newb Techie

Join Date: Dec 2006

Posts: 21

Stormdev

Default

lol, true enough.
Stormdev is offline  
Old 01-02-2007, 07:54 AM   #18 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

hehe
Yek is offline  
Old 01-02-2007, 01:39 PM   #19 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default

Is there a way to add the date/time to this for example i wanted to make a file say

echo Success! the file was downloaded at %some value%

where &some value% was the date and time element therefor giving an output of e.g

Success! the file was downloaded successfully at 2/10/06 12:54

?? thanks
Yek is offline  
Old 01-02-2007, 07:07 PM   #20 (permalink)
 
Newb Techie

Join Date: Dec 2006

Posts: 21

Stormdev

Default

Something like the following should do...

Code:
echo Success!
echo The File was downloaded and installed on %date% at %time%.

Stormdev is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On