tannerli Posted April 18, 2007 Posted April 18, 2007 Hi guys! I've got two files and i have to put them into every folder in a directory: For example i have a folder test in my workingdir and i have to copy the files into test/subfolder/file.ini then i go on and copy it into test2/subfolder/file.txt Is it possible to do something like that... CODEFor each folder in @workingdir Filecopy(file1, subdirectory) Next ...or that... CODE Filecopy(file, @workingdir & */subfolder) or something similar? Thank you very much (If you could get me an answer i could impress my boss )
t0ddie Posted April 18, 2007 Posted April 18, 2007 take a look at the _FileListToArray function. use the flag 2 for folders only Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
t0ddie Posted April 18, 2007 Posted April 18, 2007 (edited) here, i did it for you. #Include <File.au3> $FolderList=_FileListToArray(@DesktopDir, "*", 2) If @Error=1 Then MsgBox (0,"","No Folders Found.") Exit EndIf $count = $FolderList[0] for $x = 1 to $count FileCopy(@DesktopDir & "/test.txt",$FolderList[$x] & "/test.txt",1) Next MsgBox(0,"test","all done!") Edited April 18, 2007 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
tannerli Posted April 18, 2007 Author Posted April 18, 2007 Hey that was fast! Thank you! This makes the thin much easier^^ greetz tannerli P.S I did see your post about the 64 hotkeys and i think that there's no way to get more... But i also thougt i couldn't acces evry folder so i could be wrong
t0ddie Posted April 18, 2007 Posted April 18, 2007 Hey that was fast! Thank you! This makes the thin much easier^^greetz tannerliP.S I did see your post about the 64 hotkeys and i think that there's no way to get more...But i also thougt i couldn't acces evry folder so i could be wrong theres an easy way to get more hotkeys, you just use 2 scripts.i was hoping for a better alternative.im not usually online to help answer questions..., but i will agree with you.that was a fast reply. thanks! and your welcome. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now