copy only update files :
xcopy * /s /e /c /d /i /y /r /h
s - subdirectory
e - skip error
c - continous
d - only id source date is newer
i -
y - force yes
My personal experience as a programmer, system admin and database administratror.
Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts
Friday, August 10, 2012
antiwpa
Activate Windows XP Pro, Home, MCE, Server 2003, Server 2003 R2 etc (AntiWPA)
Only use this method for the following conditions
- You do not want to mess with Current License of your Windows by using OEMBIOS Changer
- You do not have the proper knowledge, or are scared to do so
- You do not want to or like to mod the BIOS
- You do not have a SLP String in your BIOS or you do not want to add one
- You are installing Windows XP on a Virual Machine
- You have SLP String which is not supported by your Windows XP version or you are unable to find a SLP String on Internet
Instructions
- Downoad the following file AntiWPA
- Extract the contents of the zip file to a folder
- Run AntiWPA.cmd
- Press Enter
- Reboot
What does this tool do ?
This tool not only Activates your Windows but also make your Windows Genuine
Validate Windows to see if it is Genuine or not
In order to confirm whether its genuine or not!
- Goto this site Windows Genuine Validation
- Right click the Info Bar and select Install ActiveX Control
- When the Internet Explorer Security warning dialog appears, click Install.
After few seconds you will receive a message saying Windows is Genuine
Important Note
Its true that this tool Activates Windows and makes it Genuine.
But the antiwpa.dll file which the tool injects is detected by most of the antivirus as Trojon/Hacktool
Here are the result from VirusTotal
AhnLab-V3 - 2011.05.27.01 - 2011.05.27 - Win-Trojan/Xema.variant
AntiVir - 7.11.8.160 - 2011.05.27 - -
Antiy-AVL - 2.0.3.7 - 2011.05.27 - Trojan/win32.agent.gen
Avast - 4.8.1351.0 - 2011.05.27 - -
Avast5 - 5.0.677.0 - 2011.05.27 - -
AVG - 10.0.0.1190 - 2011.05.27 - HackTool.GEC
BitDefender - 7.2 - 2011.05.27 - -
CAT-QuickHeal - 11.00 - 2011.05.27 - HackTool.Wpakill (Not a Virus)
ClamAV - 0.97.0.0 - 2011.05.27 - Trojan.Agent-130251
Commtouch - 5.3.2.6 - 2011.05.26 - W32/Wpakill
Comodo - 8857 - 2011.05.27 - TrojWare.Win32.HackTool.Wpakill.~A
DrWeb - 5.0.2.03300 - 2011.05.27 - Tool.Wpakill.1
eSafe - 7.0.17.0 - 2011.05.26 - Win32.Banker
eTrust-Vet - 36.1.8352 - 2011.05.27 - Win32/AntiWPA.A
F-Prot - 4.6.2.117 - 2011.05.26 - W32/Wpakill
F-Secure - 9.0.16440.0 - 2011.05.27 - -
Fortinet - 4.2.257.0 - 2011.05.27 - HackerTool/WpaKill
GData - 22 - 2011.05.27 - -
Ikarus - T3.1.1.104.0 - 2011.05.27 - HackTool.Win32.Wpakill
Jiangmin - 13.0.900 - 2011.05.26 - -
K7AntiVirus - 9.104.4726 - 2011.05.26 - Trojan
Kaspersky - 9.0.0.837 - 2011.05.27 - -
McAfee - 5.400.0.1158 - 2011.05.27 - Generic PUP.x
McAfee-GW-Edition - 2010.1D - 2011.05.27 - Generic PUP.x
Microsoft - 1.6903 - 2011.05.27 - HackTool:Win32/Wpakill
NOD32 - 6158 - 2011.05.27 - Win32/HackTool.WpaKill.C
Norman - 6.07.07 - 2011.05.26 - Hacktool.VH
nProtect - 2011-05-27.01 - 2011.05.27 - Trojan/W32.HackTool.5376
Panda - 10.0.3.5 - 2011.05.27 - HackTool/WpaKill
PCTools - 7.0.3.5 - 2011.05.19 - Hacktool.Generic
Prevx - 3.0 - 2011.05.27 - -
Rising - 23.59.04.03 - 2011.05.27 - Trojan.Win32.Generic.1233C747
Sophos - 4.65.0 - 2011.05.27 - Troj/Antiwpa-B
SUPERAntiSpyware - 4.40.0.1006 - 2011.05.27 - Trojan.Agent/CDesc[Generic]
Symantec - 20111.1.0.186 - 2011.05.27 - Hacktool
TheHacker - 6.7.0.1.211 - 2011.05.27 - -
TrendMicro - 9.200.0.1012 - 2011.05.27 - HKTL_WPAKILL
TrendMicro-HouseCall - 9.200.0.1012 - 2011.05.27 - HKTL_WPAKILL
VBA32 - 3.12.16.0 - 2011.05.27 - -
VIPRE - 9404 - 2011.05.27 - Trojan.Win32.Generic!BT
ViRobot - 2011.5.27.4482 - 2011.05.27 - Trojan.Win32.Agent.5376.B
VirusBuster - 13.6.372.0 - 2011.05.26 - HackTool.Wpakill!ExKXRGPUXEQ
File info:
MD5: 98c332990684cd9f113fbd495841c6fa
SHA1: b42d4f6996759cd5ec6b5de89f1ef1f3a40e7084
SHA256: ef09a3c84e4d30dd8e2bca084fc88f45bd79c0c83cf55651f8 0a03e44298a8bc
File size: 5376 bytes
Scan date: 2011-05-27 13:55:52 (UTC)
If you want to see the actual link, it is here VirusTotal Results
How to overcome it ?
The simplest solution to overcome the above problem is to add antiwpa.dll file in your Antivirus exceptions.
Meaning, the Antivirus software will never scan the file in future.
Tuesday, August 7, 2012
w8 leak
MICROSOFT.WINDOWS.8.PROFESSIONAL.RTM.X86.ENGLISH.D VD-WZT
BUILD: 6.2.9200.16384.WIN8_RTM.120725-1247
FILE: Windows_8_Pro_EN-US_x86.ISO
SIZE: 2,632,460,288 byte
SHA-1: B30B7D770F047CF427E836ABC048501EFF8A1FAC
MD5: 99C94934E53B4E28E955D4FCB06CAAA8
CRC: A13474A9
Magnet
MICROSOFT.WINDOWS.8.PROFESSIONAL.RTM.X64.ENGLISH.D VD-WZT
BUILD: 6.2.9200.16384.WIN8_RTM.120725-1247
FILE: Windows_8_Pro_EN-US_x64.ISO
SIZE: 3,581,853,696 byte
SHA-1: E63C1D3733532ABC7AB28F3D61526E361E80271A
MD5: 7A10316A79A543F2BF4953A4332B4323
CRC: 5D7BB5F4
Magnet
Retail
Core = FB4WR-32NVD-4RW79-XQFWH-CYQG3
Professional = XKY4K-2NRWR-8F6P2-448RF-CRYQH - retail key
ProfessionalWMC = RR3BN-3YY9P-9D7FC-7J4YF-QGJXW (Upgrade only, can't be used on WinPE) - retail key for Windows Media Center
Volume
gvlkCore=BN3D2-R7TKB-3YPBD-8DRP2-27GG4
gvlkProfessional=NG4HW-VH26C-733KW-K6F98-J8CK4
gvlkProfessionalWMC=GNBB8-YVD74-QJHX6-27H4K-8QHDG
BUILD: 6.2.9200.16384.WIN8_RTM.120725-1247
FILE: Windows_8_Pro_EN-US_x86.ISO
SIZE: 2,632,460,288 byte
SHA-1: B30B7D770F047CF427E836ABC048501EFF8A1FAC
MD5: 99C94934E53B4E28E955D4FCB06CAAA8
CRC: A13474A9
Magnet
MICROSOFT.WINDOWS.8.PROFESSIONAL.RTM.X64.ENGLISH.D VD-WZT
BUILD: 6.2.9200.16384.WIN8_RTM.120725-1247
FILE: Windows_8_Pro_EN-US_x64.ISO
SIZE: 3,581,853,696 byte
SHA-1: E63C1D3733532ABC7AB28F3D61526E361E80271A
MD5: 7A10316A79A543F2BF4953A4332B4323
CRC: 5D7BB5F4
Magnet
Retail
Core = FB4WR-32NVD-4RW79-XQFWH-CYQG3
Professional = XKY4K-2NRWR-8F6P2-448RF-CRYQH - retail key
ProfessionalWMC = RR3BN-3YY9P-9D7FC-7J4YF-QGJXW (Upgrade only, can't be used on WinPE) - retail key for Windows Media Center
Volume
gvlkCore=BN3D2-R7TKB-3YPBD-8DRP2-27GG4
gvlkProfessional=NG4HW-VH26C-733KW-K6F98-J8CK4
gvlkProfessionalWMC=GNBB8-YVD74-QJHX6-27H4K-8QHDG
Friday, July 13, 2012
host file under ms windws
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
Tuesday, June 5, 2012
April 27, 2009
By Marcin Policht
Installing Reporting Services on SQL Server 2005 Express Edition
Having completed our fairly extensive coverage of the Service Broker
characteristics specific to SQL Server 2005 Express Edition, we now turn our
attention to Reporting Services, which, while not included in the core product,
can be easily added by installing a supplemental download. While the resulting
functionality is somewhat limited (when compared with equivalent components
incorporated into full-featured editions of SQL Server), there are significant
benefits you can realize by taking advantage of extra capabilities (especially
considering that there are no software or licensing costs involved). In this
article, we will present the initial setup process, leaving discussion of
configuration, management, security, and usability until future installments of
this series.
The main purpose of Reporting Services implementation available in SQL Server 2005 Express Edition is to provide end users the ability to extract content of local databases in an easy to analyze and comprehensive manner, through a collection of predefined reports, rendered interactively as Web pages (in HTML format), Adobe Acrobat PDF files, or Excel spreadsheets. Accomplishing this goal is facilitated by a straightforward development environment (with wizard-driven and template-based projects) that leverages the familiar Visual Studio interface. The primary drawback of the version of Reporting Services we will be discussing here is the lack of more advanced features present in its full-fledged counterparts, such as support for remote data sources (in addition to access to data derived via Analysis Services or Integration Services), ad-hoc and scheduled report generation, the ability to produce additional rendering formats (XML, CSV, or TIFF), SharePoint integration, or the availability of custom authentication mechanism.
From an architectural perspective, Reporting Services consist of several components, which in the case of SQL Server 2005 Express Edition have to reside on the same computer (this restriction does not apply to other editions). At their foundation, there is the Report Server, operating as an independent Windows service, responsible for report processing and rendering, as well as overall security. Data, from which reports are derived, resides in local databases (
In order to take advantage of the reporting functionality we just briefly described, you will first need to satisfy all software-related prerequisites. In particular, since the underlying components rely on ASP.NET technology, both .NET Framework 2.0 (which you should be present on your computer already if you are running SQL Server 2005 Express Edition) and Internet Information Services (IIS) 5.0 or later have to be locally installed. The former is available in both x86 and x64 versions from the Microsoft Download Center. The setup process of the latter is rather straightforward. In the case of Windows XP Professional, this is typically done via the Add/Remove Windows Components section of Add and Remove Programs applet in the Control Panel, which initiates the Windows Components Wizard, allowing you to select Internet Information Services (IIS) entry along with its World Wide Web Service. (Note that Windows XP Home Edition cannot be used in this case, since it lacks IIS support). A similar approach can be used in the case of Windows Server 2003 and its predecessors (Windows 2000 Server and Workstation). An equivalent task on a Windows Vista computer is a bit more challenging, but fortunately well documented (for step-by-step instructions, refer to the Knowledge Base article 934164). If you intend to install Reporting Services on a computer running Windows x64 operating system, you should follow procedures described in the Knowledge Base 934162 and SQL Server 2005 Books Online How to: Install 32-bit Reporting Services on a 64-bit Computer articles (note that Reporting Services for SQL Server 2005 Express Edition are available only in 32-bit version).
Once these preliminary steps have been completed, you will need to obtain the SQL Server 2005 Express Edition with Advanced Services source files, published on the Microsoft Download Center as a self-extracting executable
When dealing with an existing SQL Server 2005 Express Edition installation, before you start the setup process, you should also make sure that there are no active User Instances (for more information about this feature, refer to an earlier article of this series). Since active User Instances place locks on database files residing in the
At this point, you are ready to proceed with the installation. While logged on with an account that is a member of local Administrators group, launch the newly downloaded
Once you reach the Service Account page, you will need to decide if Reporting Services will be running in the security context of one of the built-in System accounts (Network Service, Local System, or Local Service) or a designated domain user account, as well as whether you want to start the Reporting Services at the end of the setup. Local Service is typically recommended in the case of SQL Server 2005 Express Edition (we will discuss the reasoning behind this decision and its implications later in this series).
You will also be presented with the "Report Server Installation Options" page, where you are expected to pick one of two available settings. The first one allows you to "Install the default configuration", which creates reporting databases named
If you decided (and were able to) select default the configuration option on the Installation Options page, the setup should result in the creation of a fully functional Report Server. Otherwise, core components are installed and associated with the database engine instance you designated, but not configured yet. To deliver a working outcome, you will need to make additional modifications using Windows Management Instrumentation-based Reporting Services Configuration Tool (which shortcut appears in the Configuration Tools subfolder of Microsoft SQL Server 2005 program group menu). We will describe its interface and characteristics in the next article of this series.
» See All Articles by Columnist Marcin Policht
The main purpose of Reporting Services implementation available in SQL Server 2005 Express Edition is to provide end users the ability to extract content of local databases in an easy to analyze and comprehensive manner, through a collection of predefined reports, rendered interactively as Web pages (in HTML format), Adobe Acrobat PDF files, or Excel spreadsheets. Accomplishing this goal is facilitated by a straightforward development environment (with wizard-driven and template-based projects) that leverages the familiar Visual Studio interface. The primary drawback of the version of Reporting Services we will be discussing here is the lack of more advanced features present in its full-fledged counterparts, such as support for remote data sources (in addition to access to data derived via Analysis Services or Integration Services), ad-hoc and scheduled report generation, the ability to produce additional rendering formats (XML, CSV, or TIFF), SharePoint integration, or the availability of custom authentication mechanism.
From an architectural perspective, Reporting Services consist of several components, which in the case of SQL Server 2005 Express Edition have to reside on the same computer (this restriction does not apply to other editions). At their foundation, there is the Report Server, operating as an independent Windows service, responsible for report processing and rendering, as well as overall security. Data, from which reports are derived, resides in local databases (
ReportServer and ReportServerTempDB) designated for this
purpose. Access to reports as well as a number of administrative tasks is
handled by leveraging Report Manager, running as an ASP.NET Web application.
Finally, there are also several management and development tools, including
Windows Management Instrumentation (WMI) based Reporting Services Configuration
utility and Business Intelligence Development Studio with its Report Designer,
which we will discuss in more detail later. (More sophisticated utilities, such
as Model Designer or Report Client Builder, which deliver ad-hoc reporting capabilities,
are available only in full-featured editions of SQL Server 2005). In order to take advantage of the reporting functionality we just briefly described, you will first need to satisfy all software-related prerequisites. In particular, since the underlying components rely on ASP.NET technology, both .NET Framework 2.0 (which you should be present on your computer already if you are running SQL Server 2005 Express Edition) and Internet Information Services (IIS) 5.0 or later have to be locally installed. The former is available in both x86 and x64 versions from the Microsoft Download Center. The setup process of the latter is rather straightforward. In the case of Windows XP Professional, this is typically done via the Add/Remove Windows Components section of Add and Remove Programs applet in the Control Panel, which initiates the Windows Components Wizard, allowing you to select Internet Information Services (IIS) entry along with its World Wide Web Service. (Note that Windows XP Home Edition cannot be used in this case, since it lacks IIS support). A similar approach can be used in the case of Windows Server 2003 and its predecessors (Windows 2000 Server and Workstation). An equivalent task on a Windows Vista computer is a bit more challenging, but fortunately well documented (for step-by-step instructions, refer to the Knowledge Base article 934164). If you intend to install Reporting Services on a computer running Windows x64 operating system, you should follow procedures described in the Knowledge Base 934162 and SQL Server 2005 Books Online How to: Install 32-bit Reporting Services on a 64-bit Computer articles (note that Reporting Services for SQL Server 2005 Express Edition are available only in 32-bit version).
Once these preliminary steps have been completed, you will need to obtain the SQL Server 2005 Express Edition with Advanced Services source files, published on the Microsoft Download Center as a self-extracting executable
SQLEXPR_ADV.EXE. (SQLEXPR_ADV.EXE, in addition to the
SQL Server 2005 Express Edition and SQL Server Management Studio Express,
includes the Full Text search and Reporting Services components) as well as SQL
Server 2005 Express Edition Toolkit also available from the Microsoft Download
Center in the form of SQLEXPR_TOOLKIT.EXE. (SQLEXPR_TOOLKIT.EXE contains the Business
Intelligence Development Studio component, which facilitates report designing
and editing functionality via Reporting Services-based projects and templates).
When dealing with an existing SQL Server 2005 Express Edition installation, before you start the setup process, you should also make sure that there are no active User Instances (for more information about this feature, refer to an earlier article of this series). Since active User Instances place locks on database files residing in the
Template
Data subfolder (residing by default under Program Files\Microsoft SQL Server\MSSQL.x\MSSQL
folder, where x is an
integer assigned sequentially to each new SQL Server 2005 instance), they
prevent changes that need to be applied during the upgrade procedure. This can
be accomplished using the procedure described in the Microsoft SQL Server 2005
Express Edition with Advanced Services Readme
file, which involves temporarily disabling the User Instances configuration
option (by executing EXEC sp_configure
‘user instances enabled’,0), connecting individually to all
active instances (after identifying values of the instance_pipe_name column of the sys.dm_os_child_instances dynamic
management view), and shutting them down (with SHUTDOWN WITH NOWAIT T-SQL statement). Keep in mind that
you will need to re-enable the User Instances feature following the upgrade by
invoking EXEC sp_configure ‘user instances
enabled’, 1. In addition, if you are planning on upgrading an existing installation running on Vista, refer to the Upgrade Tips for Applying SP2 After Upgrading to Windows Vista section of How to: Upgrade Reporting Services on Windows Vista article in the SQL Server 2005 Books Online. At this point, you are ready to proceed with the installation. While logged on with an account that is a member of local Administrators group, launch the newly downloaded
SQLEXPR_ADV.EXE
to initiate the Microsoft SQL Server 2005 Setup wizard. Assuming that you are
modifying an existing instance, you do not need to be concerned about
prerequisites (otherwise, refer to the
first article of this series) or System Configuration Check. Providing that
both of them complete successfully, you will next be prompted for registration
information. On the Feature Selection page of the wizard, you will find an
option to add Reporting Services, including Report Manager and Shared Tools.
The Instance Name page that follows prompts you to choose a target database
engine instance that Report Server will be associated with (in our case, we
will use SQLEXPRESS named
instance). This decision determines the names and placement of the reporting
databases, as well as the naming convention applied when creating different
reporting components. Once you reach the Service Account page, you will need to decide if Reporting Services will be running in the security context of one of the built-in System accounts (Network Service, Local System, or Local Service) or a designated domain user account, as well as whether you want to start the Reporting Services at the end of the setup. Local Service is typically recommended in the case of SQL Server 2005 Express Edition (we will discuss the reasoning behind this decision and its implications later in this series).
You will also be presented with the "Report Server Installation Options" page, where you are expected to pick one of two available settings. The first one allows you to "Install the default configuration", which creates reporting databases named
ReportServer$instance_name and ReportServer$instance_nameTempDB,
virtual directories for Report Server (http://computer_name/ReportServer$instance_name)
and Report Manager (http://computer_name/Reports$instance_name),
as well as Windows (ReportServer$instance_name)
and Web Service identities (where instance_name
is the name of the target SQL Server 2005 Express Edition instance). The
resulting SSL settings will depend on whether the computer has the appropriate
certificates already present in its personal store. The other option installs
the software but leaves its configuration to you, which you can perform
following the completion of the wizard (this is accomplished using Reporting
Services Configuration tool). In scenarios where you are re-running setup
against an existing SQL Server 2005 Express Edition instance, the Report Server
Installation Options page will have both options grayed out, with the latter
being enforced (if you click on Details...
command button, you will be informed that "The
prerequisite check failed for a default report server installation").
After you click on Next, the content of Ready to Install page should confirm
that Reporting Services will be installed as the result of your earlier
selections. Keep in mind that (as the informational text states) you must
download and install the latest SQL Server 2005 Express Edition Service Packs
to update all newly installed components. If you decided (and were able to) select default the configuration option on the Installation Options page, the setup should result in the creation of a fully functional Report Server. Otherwise, core components are installed and associated with the database engine instance you designated, but not configured yet. To deliver a working outcome, you will need to make additional modifications using Windows Management Instrumentation-based Reporting Services Configuration Tool (which shortcut appears in the Configuration Tools subfolder of Microsoft SQL Server 2005 program group menu). We will describe its interface and characteristics in the next article of this series.
» See All Articles by Columnist Marcin Policht
|
MS SQL
FAQ |
Thursday, May 24, 2012
MS Visual Studio
MS Visual Studio
Version history Prior to Visual Studio Version 4.0 there were Visual Basic 3, Visual C++, Visual FoxPro and Visual SourceSafe as separate products. Product name Codename Internal version Supported .NET Framework versions Release date Visual Studio N/A 4.0 N/A 1995-04 Visual Studio 97 Boston 5.0 N/A 1997-02 Visual Studio 6.0 Aspen 6.0 N/A 1998-06 Visual Studio .NET (2002) Rainier 7.0 1.0 2002-02-13 Visual Studio .NET 2003 Everett 7.1 1.1 2003-04-24 Visual Studio 2005 Whidbey 8.0 2.0 2005-11-07 Visual Studio 2008 Orcas 9.0 2.0, 3.0, 3.5 2007-11-19 Visual Studio 2010 Dev10/Rosario 10.0 2.0, 3.0, 3.5, 4.0 2010-04-12from : http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
Thursday, May 10, 2012
Dos Batch
DOS Batch file to delete folders by date range
@Echo Off
Setlocal EnableDelayedExpansion
:: User Variables
:: Set this to the number of days you want to keep
Set _DaysKept=7
:: Set this to the folder that contains the folders to check and delete
Set _Path=C:\Test1
:: Get todays date
Call :GetDate
Set _yy=%_fDate:~,4%
Set _mm=%_fDate:~4,2%
Set _dd=%_fDate:~6,2%
:: Convert todays date to Julian
Call :JDate %_yy% %_mm% %_dd%
Set _JToday=%_JDate%
:: Set delete date
Set /a _DelDate=_JToday-%_DaysKept%-1
:: Get time format, _iTime will be 0 if 12 hourt clock, 1 if 24 hour clock
:: Delims= is a TAB followed by a space in the next line
:: If you copy this code, you must edit this line
For /F "TOKENS=2* DELIMS= " %%A In ('REG QUERY "HKCU\Control Panel\International" /v iTime') Do Set _iTime=%%B
If Exist "%temp%\tf}1{" Del "%temp%\tf}1{"
PushD %_Path%
Set _s=s
If %_DaysKept%==1 set _s=
Echo Please wait, searching for folders more than %_DaysKept% day%_s% old
If %_iTime%==0 (Set _Tok=1,4*) Else (Set _Tok=1,3*)
For /F "tokens=%_Tok% skip=4" %%I In ('dir "%_Path%\1*" /AD /OD /TW ^|Findstr /E "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"') Do (
Set _Name=%%K
If "!_Name:~10!"=="" If %%J==^ (
Call :GetDate %%I
Call :JDate !_fDate:~,4! !_fDate:~4,2! !_fDate:~6,2!
If !_JDate! LEQ %_DelDate% (
If Exist "%temp%\tf}1{" (
Echo %%I:%%~fK >>"%temp%\tf}1{"
) Else (
Echo.>"%temp%\tf}1{"
Echo Do you wish to delete the following folders?>>"%temp%\tf}1{"
Echo Date Name>>"%temp%\tf}1{"
Echo %%I:%%~fK >>"%temp%\tf}1{"
)) Else (
Goto :_allFound
)))
PopD
:_allFound
If Not Exist "%temp%\tf}1{" Echo No Folders Found to delete&Goto _Done
Type "%temp%\tf}1{" | More
Set _rdflag= /q
:_Prompt1
Set /P _resp=Delete All, None, or Prompt for each (A/N/P)?
If /I "%_resp:~0,1%"=="N" Goto _Done
If /I "%_resp:~0,1%"=="A" Goto _Removeold
If /I NOT "%_resp:~0,1%"=="P" (Echo (A/N/P only please)&Goto _Prompt1
Set _rdflag=
:_Removeold
For /F "tokens=1* skip=3 Delims=:" %%I In ('type "%temp%\tf}1{"') Do (
If "%_rdflag%"=="" Echo Deleting
rd /s%_rdflag% "%%J")
:_Done
If Exist "%temp%\tf}1{" Del "%temp%\tf}1{"
Goto:EOF
::===================================::
:: ::
:: - S u b r o u t i n e s - ::
:: ::
::===================================::
:JDate
:: Convert date to Julian
:: Arguments : YYYY MM DD
:: Returns : Julian date in variable _JDate
:: Usage
::Call :JDate %__GYear% %_GMonth% %_GDay%
:: First strip leading zeroes; a logical error in this
:: routine was corrected with help from Alexander Shapiro
::Code taken from datediff.bat written by Rob van der Woude
::http://www.robvanderwoude.com
Set _JMM=%2
Set _JDD=%3
IF 1%_JMM% LSS 110 Set _JMM=%_JMM:~1%
IF 1%_JDD% LSS 110 Set _JDD=%_JDD:~1%
::
:: Algorithm based on Fliegel-Van Flandern
:: algorithm from the Astronomical Almanac,
:: provided by Doctor Fenton on the Math Forum
:: (http://mathforum.org/library/drmath/view/51907.html),
:: and converted to batch code by Ron Bakowski.
Set /A _JMonth1 = ( %_JMM% - 14 ) / 12
Set /A _JYear1 = %1 + 4800
Set /A _JDate = 1461 * ( %_JYear1% + %_JMonth1% ) / 4 + 367 * ( %_JMM% - 2 -12 * %_JMonth1% ) / 12 - ( 3 * ( ( %_JYear1% + %_JMonth1% + 100 ) /
100 ) ) / 4 + %_JDD% - 32075
For %%A In (_JMonth1 _JYear1) Do Set %%A=
Goto:EOF
:GetDate
:: This subroutine will always display the same results,
:: for the date independent of "International" settings.
:: This batch file uses REG.EXE from the NT Resource Kit
:: (already installed with WinXP and Vista)
:: to read the "International" settings from the registry.
:: Date is returned as yyyymmdd in variable _fdate
:: Modified from SortDate Written by Rob van der Woude
:: http://www.robvanderwoude.com
::
If NOT [%1]==[] Set Date=%1
If "%date%A" LSS "A" (Set _NumTok=1-3) Else (Set _NumTok=2-4)
:: Delims= is a TAB followed by a space in the next two lines
:: If you copy this code, you must edit these two lines
For /F "SKIP=3 TOKENS=2* DELIMS= " %%A In ('REG QUERY "HKCU\Control Panel\International" /v iDate') Do Set _iDate=%%B
For /F "SKIP=3 TOKENS=2* DELIMS= " %%A In ('REG QUERY "HKCU\Control Panel\International" /v sDate') Do Set _sDate=%%B
IF %_iDate%==0 For /F "TOKENS=%_NumTok% DELIMS=%_sDate% " %%B In ("%date%") Do Set _fdate=%%D%%B%%C
IF %_iDate%==1 For /F "TOKENS=%_NumTok% DELIMS=%_sDate% " %%B In ("%date%") Do Set _fdate=%%D%%C%%B
IF %_iDate%==2 For /F "TOKENS=%_NumTok% DELIMS=%_sDate% " %%B In ("%date%") Do Set _fdate=%%B%%C%%D
Goto:EOF
FTP Batch
FTP -v -i -s:ftpscript.txt open example.com username password !:--- FTP commands below here --- lcd c:\MyLocalDirectory cd public_html/MyRemoteDirectory binary mput "*.*" disconnect bye
Subscribe to:
Posts (Atom)
