Jump to content
Sign in to follow this  
Andy2520

Unable to create the folders in windows xp system PFA code

Recommended Posts

Andy2520

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

Share this post


Link to post
Share on other sites
DucViet321

Aniiii

Why dont you just use @AppDataDir and DirCreate?

DirCreate(@AppDataDir & "Lotus\Notes\Data" ,"",@SW_HIDE)
Edited by DucViet321

$Money = ControlGetMoney(@Life,"People","Pocket4")If $Money Then $Rich = TrueElse $Risk = True _RunAwayFromPolice("Fastest")EndIf

Share this post


Link to post
Share on other sites
Andy2520

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 .......:)

  • Like 1

Share this post


Link to post
Share on other sites
DucViet321

Nothing,

Oops , there's a problem, I fogot to delete ,"",@SW_HIDE , please remove it before use DirCreate

DirCreate 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 :P

Edited by DucViet321

$Money = ControlGetMoney(@Life,"People","Pocket4")If $Money Then $Rich = TrueElse $Risk = True _RunAwayFromPolice("Fastest")EndIf

Share this post


Link to post
Share on other sites
Michael84

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 by Michael84

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×