Jump to content

Recommended Posts

Posted

  On 11/23/2010 at 5:14 AM, 'wraithdu said:

@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]

Posted

  On 11/23/2010 at 8:48 AM, 'wuruoyu said:

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

From the horse's mouth?
Posted

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.

  • 1 month later...
Posted

  On 11/22/2010 at 9:13 PM, 'freMea said:

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

Posted

  On 12/29/2010 at 9:20 PM, 'Emiel Wieldraaijer said:

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]

Posted

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]

Posted

  On 12/30/2010 at 8:14 AM, 'freMea said:

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

  • 2 weeks later...
Posted

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

  • 2 weeks later...
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
Posted

Let me bump a reply by James:

  On 11/22/2010 at 10:02 AM, 'JamesBrooks said:

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.
  • Moderators
Posted

CGRemakes,

  Quote

Search for a FileListToArray UDF

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

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 1/31/2011 at 9:03 PM, 'Melba23 said:

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?

  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

  On 1/31/2011 at 10:59 PM, 'Melba23 said:

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
Posted (edited)

  On 2/1/2011 at 12:41 AM, 'KaFu said:

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
  • Moderators
Posted (edited)

CGRemakes,

  Quote

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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