Sign in to follow this  
Followers 0
apathe

FileCopy by a Date in Network

5 posts in this topic

Hi Guys;

I need help im newbie in the forum.

I want to copy some txt file application server to SAP server. ok its simple

DriveMapAdd("M:","\\sap_server\destinationfolder\",0,"domain\username","password")

FileCopy("C:\sourcefolder\*.txt","M:\destinationfolder\",9)

DriveMapDel("M:")

im using this code but here is the issue;

this TXT file everyday generating at 4:00 am and file name is random genarating we dont know only thing that know file creation time how can i copy this new file every day just 1 TXT file but lastest 1 some1 can you help me

sorry for my bad language...

Share this post


Link to post
Share on other sites



Get a list of files in the source folder with _FileListtoArray("C:sourcefolder", "*.txt", 1).

Loop through the array and use FileGetTime(<filename>) and check the result for the 04:00 AM time.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

can you write full code for me i dont know really how to use it :S

Share this post


Link to post
Share on other sites

some1 can help me for this codes :S

Share this post


Link to post
Share on other sites

apathe,

Remember this is not a 24/7 support forum - please do not bump your threads within 24 hours. :naughty:

We also do not write scripts to order here - but we are very ready to help you if you make an effort yourself. hannes08 has given you a reasonable idea of how you might proceed - go and read about the functions he mentioned in the Help file and see what you can produce. Come back if you run into difficulties. :)

M23

P.S. If you need to post the code you have produced please use Code tags - put [autoit] before and [/autoit] after your posted code. ;)


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