> There could be at least two way: > (I haven't tested these, so you should test them first) > > 1) Using AllFiles > ; all in 1-line below > File.AllFiles(?"c:\music\*.wma",?'regex.replace(_file_,"_.*?_" > ,"_","_new_") > ++File.Move(_file_,_new_)') > ;all in 1-line above
Bruce put a "don't use allfiles with rename" in the .txt file so I didn't try modifying those. > 2) Using ListFiles This was what I have gotten working: @rs_rename local onames, nnames, _lines_, i onames = File.ListFiles(?"c:\My Documents\My Music\Radioshark2\*.wma") nnames = replacechars ( onames, "_Mon_", "_" ) nnames = replacechars ( nnames, "_Tue_", "_" ) nnames = replacechars ( nnames, "_Wed_", "_" ) nnames = replacechars ( nnames, "_Thu_", "_" ) nnames = replacechars ( nnames, "_Fri_", "_" ) _lines_ = line (onames, 0) for(i=1; i<=_lines_; i=i+1) File.Move (line(onames, i), line(nnames, i)) endfor Quit Works great for the move on the first time. However if there is no change in the old vs new file name, there's an error can't move file (same name). Is there another syntax to use so that you can do a non-forced move iwht the file plugin? Something like: No error dialog MOVE(filepath1, filepath2, [0]) I know that you can do something similar to the optional flag with Autoit...maybe that kind of flag would be useful with copy, and other relavent functions? Meantime I guess I'll test with if() in the for() loop before the move command for the time being. Thanks Sean! David Troesch | Atlanta, GA | ICQ# 2333123 Powerful Backup and Folder Synchronization http://www.syncback.com Funstuff: They're not spammers. They're mangy network terrorist scum. ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h1pdrnk/M=362335.6886445.7839731.1510227/D=groups/S=1706030409:TM/Y=YAHOO/EXP=1124424595/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
