Hello.
I have a few tasks I would like to play and learn with, and would
appreciate a bit of help please.
Starting in c:\testing\testing123\ I have 2 more levels of folders.
eg.
c:\testing\testing123\a\b\
I would like to recurse all files and folders under testing123.
Check filenames for ", " "," " " & " " replacing all instances with
"_". (leaving originals intact at this stage, but with the option to
rename originals before any further processing)
Note to self. Presumably, oldfile renaming will take place at this point.
Open each file, omit certain lines using
eg.
open( F, $ARGV[0] );
while( <F> ) {
if( !( m!" rocket ! or m!" science ! ) ) {
print;
}
}
The output to go to equivalent folder names, but under testing234
eg.
files found in c:\testing\testing123\a\b\
to be output to c:\testing\testing234\a\b\
Note to self. Presumably, newfile renaming will take place at this point.
This next bit should probably come first.
All filenames have a 9 char alphanumerical appended to the name,
(algorithm from date/time), making every file unique.
eg.
fred_bloggs_was_here_3979A376B.txt
fred_bloggs_was_here_3979A6ECB.txt
If there are instances of "fred_bloggs_was_here_" in say, \a\a\ and
\a\b\, then all instances in \a\b\ to be moved up to \a\a\.
I can see it getting even harder here, as I would also like to do the
same test with \a\z\ and \b\a\ (last folder in \a\ against first folder
in \b\ )
thanks
Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/