VB Code:
If Dir(Infile) = "" Then 'Checking scanhold.dat exists or not Msg = Infile & " does not exist." Else Mydate = Format(Date, "YYMMDD") Mytime = Format(Time, "HHMMSS") NewName = "\\sapt01\KPIINTERFACE\pbl\in\" & PlantName & strPreFix & Mydate & Mytime & ".txt" Name Infile As NewName 'Cut n paste 'FileCopy Infile, NewName 'copy n paste Msg = Infile & " has changed name to " & PlantName & strPreFix & Mydate & Mytime & ".txt" End If MsgBox Msg
i used this code to copy a file from one destination to other..but the destination folder (\\sapt01\KPIINTERFACE\pbl\in\) need a password to open it. this will cause failed to open path in my program. how to set a password to open a locked folder?
