how to remove folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
santhosh
Posts: 41
Joined: 02 Aug 2010 05:10

how to remove folder

#1 Post by santhosh » 10 Aug 2010 09:51

anyone plz suggest

a folder is created its name with a variable.

how to delete that folder using that variable

example:
sat_%date% is a folder name

jeb
Expert
Posts: 1055
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: how to remove folder

#2 Post by jeb » 10 Aug 2010 11:53

Hi santhosh,

if you know the content it should be easy

Code: Select all

mkdir sat_%date%
... do some stuff here
rmdir sat_%date%


But it will fail if your date has a format like "10/08/2010", the "/" is not allowed as (directory-)name.

Post Reply