comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Copy file to all subfolders
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Copy file to all subfolders [message #90913 is a reply to message #90912] Tue, 12 May 2015 07:29 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdag 12 maj 2015 kl. 15:56:27 UTC+2 skrev Kai Heckel:
> Hey there!
>
> I'd like to copy a file to all contained subfolders.
> The structure looks something like this:
>
> MAIN_FOLDER (contains the file that is supposed to be copied)
> :
> :
> - Subfolder1
> - Subfolder2
> - Subfolder3
>
> I thought about using a FOR-loop but that didn't work out yet.
>
> Would really appreciate your help here!
>
> Thanks

You could use something like

subfolders=file_search('MAIN_FOLDER/Subfolder?',count=Nfolde rs)
for i=0,Nfolders-1 do spawn,'cp '+filename+' '+subfolders[i]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plot southern coordinates in northen map
Next Topic: % Program caused arithmetic error: Floating illegal operand

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:15:43 PDT 2025

Total time taken to generate the page: 0.00422 seconds