You first copy the following code, then save as Filesave.vbs, double-click Open, what do you see?
Copy Code code as follows:
Set Objdialog = CreateObject ("Safrcfiledlg.filesave")
Set fso = CreateObject ("Scripting.FileSystemObject")
Objdialog.filename = "Test"
Objdialog.filetype = ". txt"
Intreturn = Objdialog.openfilesavedlg
If Intreturn Then
Fso. CreateTextFile (Objdialog.filename Objdialog.filetype)
Else
Wscript.Quit
End If
First
Code Copy the file and save it as filesave. vbs. Double-click it to open it. What do you see?
Copy code The Code is as follows: Set objdialog = Createobject ("safrcfiledlg. filesave ")
Set FSO = Createobject ("scripting. FileSystemObject ")
Objdialog. filename = "test"
Objdialog. filetype = ". txt"
Intreturn = objdialog. openfilesavedlg
If intreturn then
FSO. createtextfile (objdialog. filename obj
Recently related backup more frequently, in order to verify the integrity of the file, always open a file hash check tool, more trouble, so wrote this dongdong, the file is a little slow to calculate, the file MD5 value saved on the Clipboard
Recent related backup more frequently, in order to verify the integrity of t
open the folder and you will not be able to see the files.
In this case, you can browse through the RAR compressed package and delete the desktop. ini file, and the folder will become a normal folder.
WW
In this case, you can open the folder and view the content.
Copy. log records the original and copied files.Vbs code
CopyCode The Code is as follows: ostr = "TXT | JPG | Doc" 'file type. Separate
There are two files: objXML. asp: test file clsXML. asp: vbs File Code: objXML. asp % @ Language = VBScript % OptionExplicit %! -- # INCLUDEFILE = "clsXML. asp" -- % DimobjXML, strPath, and strSe have two files:
ObjXML. asp: test file
ClsXML. asp: vbs files
Code:
ObjXML. asp
Use the. vbs script, that is, the SCRIPT file, to modify the registry. If your machine does not support VBSCRIPT, read the second part. The following example is used to explain the script file:
Windows Script Host Sample Script
You have a maid-free right to use, modify, reproduce and distribute
The Sample Application Files (and/or any modified version) in any way
by zzzevazzz@ph4nt0m.org
The advantage of encoding data with BASE64 is to compress the size (relative to bin2str), with the disadvantage of increasing processing time and scripting complexity.
Because the efficiency bottleneck is the step of creating a VBS in BAT, it is generally cost-effective.
Writing files with Adodb.recordset is much better than Debug.
Most of the things are scripted, and the batch process simply generates the script with Echo.
T
When you are running some files based on vbs script language, the system may report an error. At this time, it may be that your vbs script Service has an error in the registry, because it may be due to uninstalling or installing someCodeNonstandardProgram. Here is a solution to the failure to find the script engine "VBScript:1) find the file c: \ windows \ INF \
This article writes that searching for multiple versions of N still cannot solve my problem. Many vbs versions call thunder in the following ways:
Set thunderagent = Createobject ("thunderagent. agent.1 ")
Here we will introduce the addtask function. The first parameter of this function is the URL to be downloaded, the second parameter is the file name to be saved, the third parameter is the Save path, the
Simple server file backup method compressed file name automatically named by date
Dim Filename,wshshell,fs,mycommandfilename=cstr (Now) + ". RAR "
mycommand= "rar A" +filename+ "file name or directory name to compress"
Set WshShell = WScript.CreateObject ("Wscript.Shell")
Set fs=createobject ("Scripting.FileSystemObject")
If Fs.fileexists (FileName) Then
Fs. Dele
Previously written that the method is good, but when the file is too large (in fact very small, also a few m), the corresponding array will be very large, and then there will be run-time errors, prompting memory exhaustion, so I was depressed for a long time.
Recently in the blog Traffic Records found in Baidu keyword "some very mischievous VBS program" (it seems that the young people are very like to play
Recent related backup more frequently, in order to verify the integrity of the file, always open a file hash check tool, more trouble, and wrote this dongdong, the file is a little slow to calculate, the file's MD5 value saved in the Clipboard! Effect as shown:
How to use:
1. Import the Getmd5.reg file into the
Xmlhttp.setrequestheader "Content-type", "Multipart/form-data"; boundary= " Strboundary
' Xmlhttp.setrequestheader ' content-length ', objtemp.size
Xmlhttp.send objtemp
Upload = Xmlhttp.responsetext
End Function
End Class
Dim Uploaddata
Set Uploaddata = New xmlupload
Uploaddata.charset = "Utf-8"
Uploaddata.addform the name and content of "content", "Hello World" text field
Uploaddata.addfile "File", "Test.jpg", "image/jpg", "test.jpg"
W
Use VBS to modify binary file hex data. The first parameter is the original file, the second parameter is the modified file, the third parameter is the original hex value, and the fourth parameter is the modified hex value
Available, such as: Hidden shortcuts in the target file
(incidentally, Safrcfiledlg.fileopen and Safrcfiledlg.filesave components are not).
So how do you show the User a dialog box to select a file in a Windows 7 system? The answer is the File selection dialog box in HTML:
Copy Code code as follows:
Function Browseforfile ()
Dim Shell:set Shell = CreateObject ("Wscript.Shell")
Dim Fso:set fso = CreateObject ("Scripting.FileSystemObject")
Dim
For you to introduce the VBS attribute size attribute, for everyone to learn reference.
Size Property
For a file, returns the number of bytes for the specified file, and for the folder, returns the number of bytes for all files and subfolders in the folder. Convenient for us to determine the size of the file.
Descri
Today, the computer is a bit abnormal after opening the computer, not running the "LAN" Protection program at startup, and he is "unable to find script files" such as:Found this thing, the first reaction, unplug the network cable, because it is likely to be in the virus, then out of a cold sweat, in the end what is going on?After the internet to find out, this is due to the desktop Trojan, the Trojan will hijack LNK after the Association, open any shortcut before opening its promotion of malicio
" hkey_classes_root \ Local Settings \ Software \ Microsoft \ Windows \ CurrentVersion \ traynotify "/V iconstreamsecho y | Reg Delete "hkey_classes_root \ Local Settings \ Software \ Microsoft \ Windows \ CurrentVersion \ traynotify"/V pasticonsstreamrem restart Windows Shell assumerstart Explorer
The second is the vbs file, which prompts an error. If you want to know VB, correct it ....
On Error resume n
When receiving a task, you need to regularly copy a part of the files on the file server to the SharePoint document library. A simple vbs script
Const overwriteexisting = trueSet objfso = Createobject ("scripting. FileSystemObject ")Objfso. copyfile "\ server1 \ Department \ It \ share \ it_express \ abc.xls", "\ server2 \ davwwwroot \ clds \ doclib3 \ It \"
Run normally on the win7 client, but run the sc
Download querycode. vbs (756.00 bytes) from the text file encoding Query Tool)After Downloading this file, you can query it.
Below is the detailsCode'Querycode. vbs by: fastslz'Batch query is supported and can be placed in sendto extended applications.
Set files = wscript. ArgumentsIf files. Count = 0 thenMsgbox "ple
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.