jazs Posted June 7, 2006 Posted June 7, 2006 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
Emperor Posted June 7, 2006 Posted June 7, 2006 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(...)
jazs Posted June 7, 2006 Author Posted June 7, 2006 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\*.*)
Emperor Posted June 7, 2006 Posted June 7, 2006 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 $Time = FileGetTime("M:\DailyReports", 1) If $Time[2] = @MDAY Then FileMove("c:\My Transfers\Fics\New Folder1\*.*")
jazs Posted June 7, 2006 Author Posted June 7, 2006 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
Adriaan Posted June 22, 2006 Posted June 22, 2006 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now