Simple Programming question
#1
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.
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.
#4
Re:Simple Programming question
Wait,
I still get this when I run it:
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
I still get this when I run it:
C:\Program Files\iPod\bin\*.*, Are you sure (Y/N)?
@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
#5
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.
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.
#6
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.
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.