Old 11th February 2008, 10:54   #1
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
check if dir exists

Hi,
what should i do to check if a directory exists on my filesystem?
mattia83 is offline   Reply With Quote
Old 11th February 2008, 11:21   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.20

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 11th February 2008, 12:03   #3
mattia83
Junior Member
 
Join Date: Feb 2008
Posts: 20
i included
!include "FileFunc.nsh"

and i check the dir in this way:
code:

Section "main" SEC01
...
${DirState} "C:\Documents and Settings" $R0
...
SectionEnd



but i get this error:
Invalid command: ${DirState}

why? thx
mattia83 is offline   Reply With Quote
Old 11th February 2008, 12:08   #4
xirisone
Junior Member
 
Join Date: Feb 2007
Posts: 19
add this to your code below the include statement:

!insertmacro DirState

This 'announces' the marco you want to use.

xiris
xirisone is offline   Reply With Quote
Old 11th February 2008, 12:22   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
or just use:

IfFileExists c:\DIRECTORY\*.*

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump