FileUtils rename dir name?


#1

hi

i need to rename a directory when i update category to category name.

i searched methods for FileUtils but found nothing for rename

i dont want to use mv since i need to move every file under directory to
a new directory and then remove old one

isnt there any easier way ?

thanks


#2

sine serz wrote:

hi

i need to rename a directory when i update category to category name.

i searched methods for FileUtils but found nothing for rename

i dont want to use mv since i need to move every file under directory to
a new directory and then remove old one

isnt there any easier way ?

thanks

can’t u do mv and use the wildcard

?


#3

shai rosenfeld wrote:

sine serz wrote:

hi

i need to rename a directory when i update category to category name.

i searched methods for FileUtils but found nothing for rename

i dont want to use mv since i need to move every file under directory to
a new directory and then remove old one

isnt there any easier way ?

thanks

can’t u do mv and use the wildcard

?

yes i tried this and its working thanks.

im stuck now, i dont know how to ask if a directory is empty?

I think this is very lame question, but i cannot figure it out.

anyone ?

thanks


#4

fileutils::dir

http://www.delorie.com/gnu/docs/fileutils/dir.1.html

i think.