Sign in to follow this  
Followers 0
jazs

Filemove criteria

6 posts in this topic

I am trying to create a script that will go and copy files from one place to another, but I only want it to copy the current days files and not all the other files also. Does anyone have any suggestions or maybe someone can point me in the right direction..

Thanks,

Jazs

Noob

Share this post


Link to post
Share on other sites



If you are wanting to copy only files created the same day as when your script is run you should check the time of the file and compare it with the days date.

$Time = FileGetTime("...", 1)
If $Time[2] = @MDAY Then FileMove(...)

Share this post


Link to post
Share on other sites

That didn't work... It keeps giving me a prase error. Here is what I am using

$Time = FileGetTime("M:\DailyReports", 1)
If $Time[2] = @MDAY Then FileMove(c:\My Transfers\Fics\New Folder1\*.*)

Share this post


Link to post
Share on other sites

That didn't work... It keeps giving me a prase error. Here is what I am using

$Time = FileGetTime("M:\DailyReports", 1)
If $Time[2] = @MDAY Then FileMove(c:\My Transfers\Fics\New Folder1\*.*)
c:\My Transfers\Fics\New Folder1\*.* should be encased within quotes :D

$Time = FileGetTime("M:\DailyReports", 1)
If $Time[2] = @MDAY Then FileMove("c:\My Transfers\Fics\New Folder1\*.*")

Share this post


Link to post
Share on other sites

I still can't get this to work. I even changed the $Time to $array and when it runs I still don't see the files moving

Share this post


Link to post
Share on other sites

I still can't get this to work. I even changed the $Time to $array and when it runs I still don't see the files moving

Filemove needs a Source and a Destination, That i don't see. Helpfile says: FileMove ( "source", "dest" [, flag] )

Hope this will work

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