Yashied

Copy UDF

84 posts in this topic

Never argue with an idiot. They will bring you down to their level and beat you with experience.

Share this post


Link to post
Share on other sites



@freMea

Odds are if the example was posted, then it at least works for him. If you're so much a noob that you are unable to provide relevant information regarding your errors, then maybe you're not ready for this UDF. Just saying...

Yes, you're right: I'm so much a noob! I'll be back when I'm ready. :graduated:

See you.


[list][*]AutoIt 3.3.8.1[*]Win XP PRO SP3[/list]

Share this post


Link to post
Share on other sites

Never argue with an idiot. They will bring you down to their level and beat you with experience.

From the horse's mouth?

Share this post


Link to post
Share on other sites

Enough with the off-topic non-sense. wuruoyu, you made a dumb request, got chastised for it. Move along now and cease the stupid comments from both sides.

Share this post


Link to post
Share on other sites

(makes seperate "Yashied" folder.) :graduated:


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

You're example doesn't work at home (XP PRO SP3, AutoIt v3.3.6.1) "No files were copied".

The source folder contains 5 files and the target folder is empty.

What did I miss?

Hi freMea,

Sorry for the late reply..

Search for the following code

$sFileCount = 0

$sFolderCount = 0

_CopyData(GUICtrlRead($SourceInput), GUICtrlRead($DestinationInput) & '\' & $Current, True)

Switch @error

and replace it with

$sFileCount = 0

$sFolderCount = 0

DirCreate(GUICtrlRead($DestinationInput) & '\' & $Current)

_CopyData(GUICtrlRead($SourceInput), GUICtrlRead($DestinationInput) & '\' & $Current, True)

Switch @error

Could you try again ?!

Thanks

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Could you try again ?!

Thanks for your reply.

It partially works. I tried to copy:

source folder=C:\Program Files\Fichiers communs

target folder=D:\Téléchargement\Téléchargement Internet\Temp

All the files and subdirectories are copied but the target folder is altered to D:\Téléchargement\Téléchargement Internet\Temp\1


[list][*]AutoIt 3.3.8.1[*]Win XP PRO SP3[/list]

Share this post


Link to post
Share on other sites

thanks very much Yashied!

i was wondering if it supports wildcards e.g.

_copy_CopyFile('C:\temp*.tmp','D:\temp*.tmp')

thx


[font=arial, sans-serif]How is education supposed to make me feel smarter? Besides, every time I learn something new, it pushes some old stuff out of my brain. Remember when I took that home winemaking course, and I forgot how to drive?[/font][font=arial, sans-serif]<div>This is how you annoy a web developer.</span>[/font]

Share this post


Link to post
Share on other sites

Thanks for your reply.

It partially works. I tried to copy:

source folder=C:\Program Files\Fichiers communs

target folder=D:\Téléchargement\Téléchargement Internet\Temp

All the files and subdirectories are copied but the target folder is altered to D:\Téléchargement\Téléchargement Internet\Temp\1

This is correct

The first time it is copied to \1

The Second time it is copied to \2


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Hi

I did try to use this one but it dident work ,I have copied all the files to my script directory but still it wont work .

can you please tell me what I need to do with the #Include <Copy.au3> ,to where do I need to copy the "Copy.zip" content ?

Thanks :x

Share this post


Link to post
Share on other sites

#31 ·  Posted (edited)

I was wondering what the best way would be to have the option to exclude files/folders? I also second the question on whether this UDF supports wildcards? If not, how hard would that be to implement?

Edited by CGRemakes

Share this post


Link to post
Share on other sites

Let me bump a reply by James:

No, it's not reasonable for part of the UDF.

The idea of a UDF is to allow developers to write their own wrappers around the functions provided. It's up to you to use Copy.au3 to make it act like you want it to.

Search for a FileListToArray UDF matching your needs and combine it with this one.

Share this post


Link to post
Share on other sites

Fair enough. I just didn't know if those things were built in to this UDF. I will make it work.

Share this post


Link to post
Share on other sites

CGRemakes,

Search for a FileListToArray UDF

Try the RecFileListToArray UDF in my sig - it has both include and exclude options. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

CGRemakes,

Try the RecFileListToArray UDF in my sig - it has both include and exclude options. :)

M23

I'll take a look at that one. There's also option that has similar features. Which is more efficient?

Share this post


Link to post
Share on other sites

CGRemakes,

There are lots of that type of script on the forum - I have no idea which is most "efficient". Just try some and see if they work for you. ;)

My version does have a lot of options beyond the include/exclude lists - such as sorting the results, limiting the level of recursion, the level of path information added to the file name..... :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#37 ·  Posted (edited)

CGRemakes,

There are lots of that type of script on the forum - I have no idea which is most "efficient". Just try some and see if they work for you. ;)

My version does have a lot of options beyond the include/exclude lists - such as sorting the results, limiting the level of recursion, the level of path information added to the file name..... :)

M23

That's understandable. Yeah, the large number of options is what makes it somewhat to determine which one will work best. Sorting isn't important, nor is limiting the level of recursion (at least in my case). Include/exclude is really the only additional feature I need. It would be nice to find one that has a way of excluding a specific path, not just a filename/directory (meaning I could exclude c:\temp\file.txt, and not just file.txt). I'm guessing I'll have to find one and tweak it to get it to work the way I want. I'll play with a few different options and see what works best.

Edited by CGRemakes

Share this post


Link to post
Share on other sites

What Melba really meant was that you should download the function RecFileListToArray linked in his signature, that's all you every need.

Share this post


Link to post
Share on other sites

#39 ·  Posted (edited)

What Melba really meant was that you should download the function RecFileListToArray linked in his signature, that's all you every need.

I know what he meant. I looked at it, in addition to a few other options. His is an acceptable option, I just don't need some of the extra features like sorting. Whether I use his or another one, most likely I'll have to tweak it so the exclude option allows for an entire path (with wildcards), not just an individual file/folder. For example, say I want to exclude C:\temp\test.txt file, but I want to include c:\temp\temp\test.txt. I need to have greater flexibility on how to specify exactly which one I want to exclude. I have not yet found one that will allow that. They only allow me to exclude test.txt, which would exclude it from both those paths. Yes, I suppose I could include an extra check after returning all the files, but it's just another check that should probably be done as it's gathering all the file structure info into the array in the first place.

Edited by CGRemakes

Share this post


Link to post
Share on other sites

#40 ·  Posted (edited)

CGRemakes,

an acceptable option

You do have a way with words..... :)

Enjoy writing your own version - I know how long it took to write mine to an acceptable level. :idiot:

Please do feel free to use of any of the code in my UDF. ;)

M23

Edit: Removed some unnecessary text. :idiot:

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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