Needed: Script for file tree delete and file tree move 
Author Message
 Needed: Script for file tree delete and file tree move

I'm looking for a script to delete all files and subdirectories under a given
directory and also a script to move files and subdirectories between a known
source and target directory.

Any help is appreciated,

Thanks,

Barry



Wed, 18 Jun 1902 08:00:00 GMT  
 Needed: Script for file tree delete and file tree move

Quote:

> I'm looking for a script to delete all files and subdirectories under
a given
> directory and also a script to move files and subdirectories between
a known
> source and target directory.

> Any help is appreciated,

> Thanks,

> Barry

on unixes:
  man mv
  man rm

on win2k
  move /?
  del /?

from perl you can system() the commands

Brendon

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Needed: Script for file tree delete and file tree move


Quote:
>I'm looking for a script to delete all files and subdirectories under a given
>directory and also a script to move files and subdirectories between a known
>source and target directory.

>Any help is appreciated,

File::Find  -  Traverse a file tree
File::Copy  -  Copy files or filehandles
unlink      -  Deletes a list of files
rename      -  Changes the name of a file
               (will usually not work across file system boundaries)

--

I'm interested in the fact that the less secure a man is, the more likely
he is to have extreme prejudice.
- Clint Eastwood



Wed, 18 Jun 1902 08:00:00 GMT  
 Needed: Script for file tree delete and file tree move


Quote:
> I'm looking for a script to delete all files and subdirectories under a given
> directory and also a script to move files and subdirectories between a known
> source and target directory.

> Any help is appreciated,

File::Find is what you are looking for
http://theoryx5.uwinnipeg.ca/CPAN/perl/File/Find.html

enjoy.

e.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. search and replace in a file tree, only for files that match

2. Modifying \n\r on a directory tree of html files to \n files for UNIX

3. Modifying \n\r on a directory tree of html files to \n files for UNIX

4. Seeking Tree::Base or other binary tree module to avoid reinventing the wheel

5. A tree program recursing the directory tree

6. RFC Pod::Tree - tree-based POD parser

7. Help moving directory trees on NT?

8. convert a perl tree into a C tree

9. Is there a Tree widget in perlTk that resembles the Tree widget in Tk

10. deleting items in Tk::Tree / Tk::HList

11. solutionL: eloquent file trees

12. count lines in files in a directory tree

 

 
Powered by phpBB® Forum Software