As we can give the current time as file name in java , can we do the same with folders too? Can we give the name of the folder as current time stamp? please help.Thank You.
yes something like this.
Date now = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("hh mm ss");
String time = dateFormat.format(now);
File dir = new File(time);
dir.mkdir();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With