Sign in to follow this  
Followers 0
dirty

more ways to copy files and folders needed

7 posts in this topic

Are there any other ways to copy files other then using

DirCopy

FileCopy

or

RunWait (@ComSpec & ' /k xcopy /E/D/H/Y "Source Folder" "destination folder"')

Only xcopy provides enough options to deal with dates of existing files thus making copying fast if dirs have ton of files in then and u only need to copy changed or newer keeping older one unaffected once.

I was wondering if there is some sort of DllCall function that can be used to do that ?

Any file copy alternatives please post if you know of any.

If autoit had more options for DirCopy and FileCopy, i wouldn't bug you guys.

Thanks for any help if any will reply.

Share this post


Link to post
Share on other sites



It would help if you said exactly why you need something else, but the easiest way would be to write one yourself.


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

write what my self ?

I need something else because using CMD in autoit scripts is time consuming and not very reliable when running 64bit OS.

If autoit script had a code to copy files using CMD xcopy from %programfiles% and autoit script compiled without X64 option set, then %programfiles% becomes %programfiles(x86)% because script is 32bit. Unless script compiled to X64 making the code trying to copy files from non existing folders and get stuck due to that error.

Its all windows 7 making me suffer all this, even when exporting registry keys. When autoit script compiled to 32bit and trying to read registry values from local machine/software it would end up reading them from local machine/software\wow64 something instead...

anyway

Just wondering if there are other ways then those 2 i posted.

Share this post


Link to post
Share on other sites

In your case, I think it's better to make one yourself.

When I have to deal with Date-Time calculations, I usually turn to C# since it has support for those. It's just easier to process dates there than in AutoIt. The last program I made in C# was a log file deleter that deleted all files in selected folders that were within a selected date range.

Share this post


Link to post
Share on other sites

interesting. guy who is coding BING.com told me to start from C# and go up to C++ due to autoit being kinda like basic. (but so cool)

I guess i have to learn more then one :mellow:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You can't always use one programming language to solve all your problems. You get the right tool for the right job.

You choose the one with the best feature set that supports the requirements of what you need to make, not to mention also the amount of effort that will be required of you to produce what you want.

That's why I use AutoIt for automation of GUI interaction, instead of C++ or C#, which would take more time for me to learn to make what AutoIt already offers through its library.

I still make batch scripts when what I need to do is simple enough not to require a compiled script.

Edited by omikron48

Share this post


Link to post
Share on other sites

yeah me too, i work with batch allot as well as with autoit.

Its time to starte moving up the stairs to C++ starting with C# first.

After all, C++ is the most powerfull programming language (or so i think ? Games coded with C++ and there is nothing faster for games then C++)

Anyway thanks for taking time answering.

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
Sign in to follow this  
Followers 0