Computing.Net > Forums > Programming > batch file coverting to VBS file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file coverting to VBS file

Reply to Message Icon

Name: icecold3000
Date: September 7, 2007 at 13:14:22 Pacific
OS: XP
CPU/Ram: P4
Product: HP
Comment:

How to I convert this batch information to a vbs file

@ECHO off
cls
set t=2

if "%date%z" LSS "A" set t=1


for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo/^|date') do (
for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do (
set %%a=%%d
set %%b=%%e
set %%c=%%f
)
)

set /a dd=100%dd%%%100,mm=100%mm%%%100


set /a dd= dd - 7
:set /a dd = 25
:set /a mm = 6
:set /a YY = 07

if /i %dd% LEQ 0 set /a dd=1

if %mm% LSS 10 set mm=0%mm%

if %dd% LSS 10 set dd=0%dd%


ECHO %mm%-%dd%-%yy%

pause

xcopy "W://

set a=
set b=
set c=
set d=
set e=
set f=
set t=
set dd=
set mm=
set yy=

icecold3000



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: September 9, 2007 at 17:51:48 Pacific
Reply:

Subtract 7 days from now?

Dim past
past = Now - 7


0
Reply to Message Icon

Related Posts

See More


Batch file help Batch Programming



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file coverting to VBS file

use vb.net to execute batch files www.computing.net/answers/programming/use-vbnet-to-execute-batch-files/11905.html

Need batch file to delete old files www.computing.net/answers/programming/need-batch-file-to-delete-old-files/14092.html

batch file to reformat text file www.computing.net/answers/programming/batch-file-to-reformat-text-file/15352.html