6 replies
by alterego2
Your question is a little vague but I hope this is of some help.
The vbscript below uses the file system object to create a new file and the TRUE property allows you to overwrite the file if it already exists.
<%
dim objFile, objFolder, objFile
Set objFile = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFile.GetFolder("c:\foldername\")
Set objFile = objFolder.CreateTextFile("textfile.txt", True)
objFile.WriteLine("text goes here.")
objFile.Close
%>
by jgreer
Assuming you're operating in Access
docmd.setwarnings False 'turns off warning messages
docmd.setwarnings True 'turns them back on and should be included in any error handling code.
Hope this helps
John
by jgreer
by jgreer
This is the actual script that isn't working. It should be copying the contents of these directories from one main share to other shares at other sites.
Cls
REM Empty all Document Share Directories
del W:\Adm\*.* /Y X:\Adm\*.* /Y Y:\Adm\*.* /Y Z:\Adm\*.* /Y
del W:\Ehs\*.* /Y X:\Ehs\*.* /Y Y:\Ehs\*.* /Y Z:\Ehs\*.* /Y
del W:\Eng\*.* /Y X:\Eng\*.* /Y Y:\Eng\*.* /Y Z:\Eng\*.* /Y
del W:\Hr\*.* /Y X:\Hr\*.* /Y Y:\Hr\*.* /Y Z:\Hr\*.* /Y
Copy U:\Adm\*.* /Y W:\Adm\*.* /Y
Copy U:\Adm\*.* /Y Y:\Adm\*.* /Y
Copy U:\Ehs\*.* /Y W:\Ehs\*.* /Y
Copy U:\Ehs\*.* /Y Y:\Ehs\*.* /Y
Copy U:\Eng\*.* /Y W:\Eng\*.* /Y
Copy U:\Eng\*.* /Y Y:\Eng\*.* /Y
Copy U:\Hr\*.* /Y W:\Hr\*.* /Y
Copy U:\Hr\*.* /Y Y:\Hr\*.* /Y
Copy U:\It\*.* /Y W:\It\*.* /Y
Copy U:\It\*.* /Y Y:\It\*.* /Y
Copy U:\Maint\*.* /Y W:\Maint\*.* /Y
Copy U:\Maint\*.* /Y Y:\Maint\*.* /Y
Copy U:\Op\*.* /Y W:\Op\*.* /Y
Copy U:\Op\*.* /Y Y:\Op\*.* /Y
Copy U:\Policy\*.* /Y W:\Policy\*.* /Y
Copy U:\Policy\*.* /Y Y:\Policy\*.* /Y
Exit
by jgreer
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending