Jump to content

Copy into each folder


Recommended Posts

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...

CODE
For 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 :shocked: )

Link to comment
Share on other sites

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 by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

Hey that was fast! Thank you! :shocked:

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 :(

Link to comment
Share on other sites

Hey that was fast! Thank you! :shocked:

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 :(

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...