Jump to content

Check for and create a directory


pooorboy
 Share

Recommended Posts

I am having a hard time to check to make sure a directory exists. Here is the program. I am running it on windows XP.

ifexist, "%allusersprofile%\\Application Data\\Spybot - Search & Destroy", goto, Copy

FileCreateDir, "\\%allusersprofile%\\Application Data\\Spybot - Search & Destroy\\"

Copy:

FileCopy, "g:\\apps\spynet\\configuration.ini", "%allusersprofile\\Application Data\\Spybot - Search & Destroy"

exit

What am I doing wrong?

Link to comment
Share on other sites

can't be this easy, could it?

<{POST_SNAPBACK}>

Thanks for seeing the error. However, that is not the main problem. The directory does exist yet it does not jump to COPY:. It proceeds to the next line. The next line, if the the directory does not exists, is not created. So line 2 doesn't work either. Is my syntax wrong?
Link to comment
Share on other sites

  • Developers

Thanks for seeing the error. However, that is not the main problem. The directory does exist yet it does not jump to COPY:. It proceeds to the next line. The next line, if the the directory does not exists, is not created. So line 2 doesn't work either. Is my syntax wrong?

<{POST_SNAPBACK}>

what about the missing "\\" infont of the filepath ?

ifexist, "\\%allusersprofile%\\Application Data\\Spybot - Search & Destroy", goto, Copy

FileCreateDir, "\\%allusersprofile%\\Application Data\\Spybot - Search & Destroy\\"

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

what about the missing "\\" infont of the filepath ?

ifexist, "\\%allusersprofile%\\Application Data\\Spybot - Search & Destroy", goto, Copy

FileCreateDir, "\\%allusersprofile%\\Application Data\\Spybot - Search & Destroy\\"

<{POST_SNAPBACK}>

Nope, doesn't work that way either. Can anyone try this and let me know if it works for them. Thanks
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...