General Discussion Off-Topic Discussion and Enlightenment

Simple Programming question

Thread Tools
 
Search this Thread
 
Old 01-22-2005, 10:50 AM
  #1  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Simple Programming question

I'm making a batch file for Command Prompt to remove some directories on my hard drive that magically appear sometimes.. I'm used to working with DOS but not the Command Prompt in XP, and I'm having a brain fart. Two questions:

1) What is the command to remove a directory, even if it is full of files?
2) When you would do a command, such as "del *.*" for instance, do you have to add an additional command for it to say yes, or does it to it by itself?

Thanks for any/all help.
HondaTuner is offline  
Old 01-22-2005, 10:51 AM
  #2  
3.0 BAR
 
Ravage70's Avatar
 
Join Date: Jan 2004
Posts: 5,933
Default Re:Simple Programming question

u must remove all files before removing a folder
u dont need a yes or no
Ravage70 is offline  
Old 01-22-2005, 10:53 AM
  #3  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Re:Simple Programming question

That's retarded, I remember being able to remove a directory without clearing everything out stupid microsoft..

Thanks man
HondaTuner is offline  
Old 01-22-2005, 10:59 AM
  #4  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Re:Simple Programming question

Wait,

I still get this when I run it:

C:\Program Files\iPod\bin\*.*, Are you sure (Y/N)?
So what should I do? This is my code.

@echo off
cd\
cd program files
cd ipod
cd bin
del *.*
cd..
del *.*
cd..
cd iTunes
cd CD Configuration
del *.*
cd..
del *.*
cd..
rmdir ipod
rmdir itunes
echo
HondaTuner is offline  
Old 01-22-2005, 11:43 AM
  #5  
3.0 BAR
 
kain's Avatar
 
Join Date: Sep 2003
Posts: 5,448
Default Re:Simple Programming question

well, its simple. use deltree,

lets assume you want to delete the folder and everything and its contents.

you start off in c:/homemadeturbo/****

and in this directory is a fodler that keeps on coming up for no reason called kiddie.so it would be like this

@echo
deltree kiddie*.*
y
@echo

thats what i know. i know deltree deletes everything up to the **** folder. thats what i used to use before i used format. i would go into the C: root directory, and ty[pe in deltree, and it would whipe out everything. but this was a slow process.
kain is offline  
Old 01-22-2005, 11:49 AM
  #6  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Re:Simple Programming question

Deltree doesn't work with Windows XP, I would have used it if it did.

I'm also assuming I'd have throw in a "y" after the del *.* command? ravage said I didn't but it still asks for it.. might as well try.
HondaTuner is offline  
Old 01-22-2005, 11:55 AM
  #7  
3.0 BAR
 
kain's Avatar
 
Join Date: Sep 2003
Posts: 5,448
Default Re:Simple Programming question

deltree doesnt work in xp? damn, that sux.
kain is offline  
Old 01-22-2005, 01:04 PM
  #8  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Re:Simple Programming question

Yeah.. its stupid IMO..

Anyone else have any ideas?
HondaTuner is offline  
Old 01-22-2005, 02:49 PM
  #9  
0.0 BAR
 
J-SMITH69's Avatar
 
Join Date: Dec 2002
Posts: 0
Default Re:Simple Programming question

reinstall XP so whatever is ------ with you stops.
J-SMITH69 is offline  
Old 01-22-2005, 03:31 PM
  #10  
0.0 BAR
Thread Starter
 
HondaTuner's Avatar
 
Join Date: Dec 2003
Posts: 0
Default Re:Simple Programming question

Reinstalling XP isn't going to do crap... reformatting might, but the problem will arise again. So what would be the point?
HondaTuner is offline  


Quick Reply: Simple Programming question



All times are GMT -5. The time now is 11:52 AM.