Thread: AI Utility
View Single Post
  #4  
Old May 1st, 2004, 11:32 PM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: AI Utility

Ok, figured out a sort-of kludge... turns out I don't really need perl, I can work around it in other ways

code:
 
@for /D %%d in (*) do @for %%f in (AI_*.txt) do @for /F "usebackq tokens=2* delims=_" %%g in ('%%f') do @copy %%f .\%%d\%%d_%%g_%%h
@for /D %%D in (*) do @for %%F in (.\%%D\*.txt_) do @rename .\%%D\%%~nF.txt_ %%~nF.txt

Same procedure as before, takes all files matching AI_*.txt in a directory, and copies it to all subdirectories, taking off the 'AI_' and replacing it with '{subdirname}_'.

Link in first post has been updated.
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote