Sign in to follow this  
Followers 0
gcue

can i use quotes around a variable?

3 posts in this topic

I'm trying to delete some files from a directory that may vary on different machines here at work.

$npath = IniRead("c:\lotus\notes\notes.ini", "Notes", "Directory", "NotFound")

FileDelete ( $npath\cache.ndk )

FileDelete ( $npath\*.tmp )

FileDelete ( $npath\~*.* )

problem is, i can't use quotes around the variable otherwise it wont file the path

any of u geniuses out there that can help me get around this?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

FileDelete($npath & "\~*.*")

The & symbol alows you to use the variable, then continue in quotes

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

FileDelete($npath & "\~*.*")

The & symbol alows you to use the variable, then continue in quotes

thanks for the quick reply.. works like a charm!!!!

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  
Followers 0