Jump to content

how to copy one file to all the Dirs/Folders


Recommended Posts

hi,

i want to copy

c:\MyPic_004.jpg

to all the dirs in my computer but only in d:\ , e:\ & f:\ Drives

AnyWay to do this via autoIt Script.

it Should be copied after opening the Directory/Folder

because my d:\ , e:\ & f:\ drives are usb drives ( card reader drives).

therefore i want to advertise of my mobiles shop with this pic.

i 'll copy this pic to all the mmc cards for advertising of my shop .

sorry for bad english .

i 'll be very thankfull to if someone provides its code.

Link to comment
Share on other sites

i don't have much time to write a full script but i think it can be start with

$a=DriveGetDrive("REMOVABLE")
if FileExists ($a) then
FileCopy ("c:\MyPic_004.jpg", $a)
endif

this'll copy your picture to the USB, that's all i can think of now

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

#include<array.au3>
$var = DriveGetDrive("REMOVABLE")

if not @error Then
    
    For $i = 1 To $var[0]
    if $var[$i] <> 'a:' Then
    FileCopy('c:\MyPic_004.jpg',$var[$i])
    EndIf
    Next
Else
    MsgBox(0,"","No Drives found",0)
endif

Link to comment
Share on other sites

$a=DriveGetDrive("REMOVABLE")
if FileExists ($a) then
FileCopy ("c:\MyPic_004.jpg", $a)
endif

this'll copy your picture to the USB, that's all i can think of now

But this code is not working please tell me more about it.....

how to fix it ?

thanks for giving time to help me .....

Edited by Grover
Link to comment
Share on other sites

try with Aceguy ones, i think it can work

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

Thanks a lot to

d4rk & aceGuy

Keep Helping the newbies .

You're welcome !

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

#include<array.au3>
$var = DriveGetDrive("FIXED")

if not @error Then
    
    For $i = 1 To $var[0]
    if $var[$i] <> 'a:' Then
    FileCopy('c:\MyPic_004.jpg',$var[$i])
    EndIf
    Next
Else
    MsgBox(0,"","No Drives found",0)
endif

Link to comment
Share on other sites

anyone knows how to use this function for fixed drives.

try to replace "REMOVABLE" by "FIXED"

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

#include<array.au3>
$var = DriveGetDrive("FIXED")

if not @error Then
    
    For $i = 1 To $var[0]
    if $var[$i] <> 'a:' Then
    FileCopy('c:\MyPic_004.jpg',$var[$i])
     filecopy('c:\mypic_005.jpg',$var[$i])  
     filecopy('c:\mypic_006.jpg',$var[$i])    
EndIf
    Next
Else
    MsgBox(0,"","No Drives found",0)
endif

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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