Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Simply script i suppose

Reply
 
Old 06-04-2009   #1 (permalink)
Uyyy


 
 

Simply script i suppose

Hi!.
At the first of all tell you i have no idea about scripting and zero idea
about vbs.
I have this script 1 that it copy files name starts "dife" from f unit to g
unit, but
now i'm trying it copy files name with starts "dife" and date of previous
day
(script 2)

Script 1

C:\WINDOWS\system32\robocopy F:\ G:\ Dife*.*

Script 2
for /f "usebackq tokens=1,2,3 delims=/" %%i IN (`DATE /T`) do set
tmpfecha=%%k%%j%%i
for /f "usebackq tokens=1,2,3 delims= " %%i in (`echo %tmpfecha%`) do set
mifecha=%%i%%k%%j
set cont=1
set /a mifecha2=%mifecha%-%cont%
C:\WINDOWS\system32\robocopy F:\ G:\ "Dife*%mifecha2%.*"

This substract one day to mifecha, but if day of mifecha is 20090601 result
of mifecha2 is 20090600 instead of 20090531 or 20090530 depending month. Of
course february only have 28 days.

Any one knows script to control this for windows 2003 server?
Thanks a lot.




My System SpecsSystem Spec
Old 06-04-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: Simply script i suppose

Have a look at my reply to your identical post in the Server
newsgroup, then check out this link to see why multiposting is not a
good idea. Use crossposting instead if you wish to increase the size
of your audience. http://www.blakjak.demon.co.uk/mul_crss.htm


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Reversing Default Email - Something Supid, I Suppose Vista mail
Re: Reversing Default Email - Something Supid, I Suppose Live Mail
not too bad these forums , i suppose ;) Chillout Room
Suppose someone opened a hotmail email window Vista General
Suppose there is a file containing a song sung by a singer Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46