yogesh patil in dell
Answers were Sorted based on User's Feedback
Answer / yogesh
'MERGE CONTENTS OF TWO FILE
Option Explicit
Const conForReading = 1
Const ForAppending = 8
Dim objFSO: Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim file1,file2,file3,contents1,contents2
Dim strfile1,strfile2,strfile3 'Declare
variables
strfile1=inputbox("Enter path of Source file 1","Copy file
utility"," ")
strfile2=inputbox("Enter path of Source file 2","Copy file
utility"," ")
strfile3=inputbox("Enter path of To Create Target
file","Copy file utility"," ")
Set file1 = objFSO.OpenTextFile(strfile1, conForReading,
False)
Set file2 = objFSO.OpenTextFile(strfile2, conForReading,
False)
Set file3 = objFSO.CreateTextFile(strfile3, ForAppending,
True)
'Set Objects
contents1 = file1.ReadAll
contents2 = file2.ReadAll
'Read file contents
file1.Close
file2.Close
'Close file after use
file3.WriteLine(contents1)
file3.writeLine(contents2)
'Write contents to file
file3.Close
'Close file after use
Set file1 = Nothing
Set file2 = Nothing
Set file3 = Nothing
Set objFSO = Nothing
'freezing memory of objects
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / yogesh
option explicit
Dim objFSO: Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim colDrives:Set colDrives = objFSO.Drives
Dim objDrive,path,s
For Each objDrive in colDrives
path=objDrive.DriveLetter&":"
SearchPath(Path)
Next
Function SearchPath(Path) ' Defination of function
Dim BigFile,BigSize:BigSize=0
Dim objFSO: Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim objfolder:Set objfolder= objFSO.GetFolder(path &"\")
Dim ColSubFolders:Set ColSubFolders=objfolder.subfolders
Dim ObjSubFolder,objFile,colFiles
For each ObjSubFolder in ColSubFolders
Set colFiles=objfolder.files
For each objFile in colFiles
if(objFile.size>BigSize) then
BigSize=objFile.size
BigFile=objFile.name
end if
next
next
msgbox BigFile &BigSize
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / yogesh
'CREATE FOLDER STRUCTURE
Option Explicit
Dim objFSO:Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim strDirectory:strDirectory=inputbox("Enter
path ","Create folder utility"," ")
'Declare variables
GeneratePath(strDirectory)
'Call to Function
Function GeneratePath(pFolderPath) ' Defination of function
GeneratePath = False
If Not objFSO.FolderExists(pFolderPath) Then
If GeneratePath(objFSO.GetParentFolderName(pFolderPath))
Then 'Recursive call to function
GeneratePath = True
Call objFSO.CreateFolder(pFolderPath)
End If
Else
GeneratePath = True
End If
End Function
| Is This Answer Correct ? | 1 Yes | 1 No |
main() { enum _tag{ left=10, right, front=100, back}; printf("%d, %d, %d, %d", left, right, front, back); }
What is the difference between a free-standing and a hosted environment?
how to print this pyramid * * * * * * * * * * * * *
write a c program to store and print name,address,roll.no of a student using structures?
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
yogesh patil in dell
What does do in c?
How do you override a defined macro?
what is the use of c program?
4 Answers Synergy, Web Synergies,
Explain the difference between struct and union.
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;
What is the purpose of realloc()?