Andy2520 Posted May 4, 2013 Share Posted May 4, 2013 Hi all, below code works in apart from winxp system ... I am trying to create the folder in specified location Win xp i am unable to create the folde by using below code any suggessition please why its not creating folder in win xp.. This will work in Win 7 . $OS=@OSVersion if $OS ="Win_XP" Then Run(@ComSpec & " /k cd %userprofile% & cd Local Settings & cd Application Data & MD Lotus\Notes\Data" ,"",@SW_HIDE) Else Run(@ComSpec & " /k cd %userprofile% & cd Appdata & cd Local & MD Lotus\Notes\Data" ,"",@SW_HIDE) EndIf Link to comment Share on other sites More sharing options...
DucViet321 Posted May 4, 2013 Share Posted May 4, 2013 (edited) AniiiiWhy dont you just use @AppDataDir and DirCreate?DirCreate(@AppDataDir & "Lotus\Notes\Data" ,"",@SW_HIDE) Edited May 4, 2013 by DucViet321 $Money = ControlGetMoney(@Life,"People","Pocket4")If $Money Then $Rich = TrueElse $Risk = True _RunAwayFromPolice("Fastest")EndIf Link to comment Share on other sites More sharing options...
Andy2520 Posted May 4, 2013 Author Share Posted May 4, 2013 Aniiii Why dont you just use @AppDataDir and DirCreate? DirCreate(@AppDataDir & "Lotus\Notes\Data" ,"",@SW_HIDE) Thank you so much i want to create directory in user profile i will use below code .. DirCreate(@UserProfileDir & "LotusNotesData" ,"",@SW_HIDE ) thanks u so much....u r the rock ....... DucViet321 1 Link to comment Share on other sites More sharing options...
DucViet321 Posted May 4, 2013 Share Posted May 4, 2013 (edited) Nothing,Oops , there's a problem, I fogot to delete ,"",@SW_HIDE , please remove it before use DirCreateDirCreate Function only need path to create Folder: DirCreate ( "path" )BTW, you should put autoit code between autoit bbcode : [autoit] Your code [ /autoit] to make it easy to understand Sorry for bad English Edited May 4, 2013 by DucViet321 $Money = ControlGetMoney(@Life,"People","Pocket4")If $Money Then $Rich = TrueElse $Risk = True _RunAwayFromPolice("Fastest")EndIf Link to comment Share on other sites More sharing options...
Michael84 Posted January 8, 2014 Share Posted January 8, 2014 (edited) Hello to all Since few hours i'm play around with AutoIt. First thanks for the many information here in the forum. I noticed that the code above is not quite correct. There is missing a backslash in the path. ;does not work, missing backslash DirCreate(@AppDataDir & "Lotus\Notes\Data") ;This is how it works, tested on windows 7 pro x64 DirCreate(@AppDataDir & "\Lotus\Notes\Data") I know the thread is old and the correction is peanuts. But maybe it will help someone. Best Regards Michael Edited January 8, 2014 by Michael84 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now