Hi,
after using "GetNewestFile>" the directory where the file is in, seems to be locked until Macro Scheduler is closed. Occurred under Windows XPsp3.
Can anyone confirm this, and if yes whats the solution to get the directory unlocked again?
GetNewestFile> locks directory?
Moderators: JRL, Dorian (MJT support)
GetNewestFile> locks directory?
regards
migro
migro
Ok, That was reproducable. The folder could not be renamed until I exited out of Macro Scheduler. Tried on my Win 7 machine and the function does NOT lock the folder as it does with Win XP.
No idea how to remedy this. We'll have to wait to hear what Marcus can do. In the mean time there is always DOS.
No idea how to remedy this. We'll have to wait to hear what Marcus can do. In the mean time there is always DOS.
Code: Select all
Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
Run>cmd /c dir c:\folder\*.* /b /a-d /o-d > %temp_dir%dirlist.txt
ReadLn>%temp_dir%dirlist.txt,1,NewestFile
DeleteFile>%temp_dir%dirlist.txt
Thanks for Your help and the suggestion.
I have used the function primarily to get an idea when the folder, where the files are in, was created, because i missed a function to get a folders creation date.
I've done it inbetween with a little piece of VB-Code. Maybe it is usefull for someone who have the same needs.
I have used the function primarily to get an idea when the folder, where the files are in, was created, because i missed a function to get a folders creation date.
I've done it inbetween with a little piece of VB-Code. Maybe it is usefull for someone who have the same needs.
Code: Select all
Let>strFolder=C:\temp
Gosub>GetDirDate
MDL>%strDirDate%
SRT>GetDirDate
VBSTART
Function GetFolderDate(strFolder)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder(strFolder)
GetFolderDate= Folder.DateCreated
End Function
VBEND
VBEval>GetFolderDate("%strFolder%"),strDirDate
MidStr>%strDirDate%,1,10,strDirDate
END>GetDirDate
regards
migro
migro