Jump to content

FileExists() Seems not working at all


senatin
 Share

Recommended Posts

#Region DETECTOR
If FileExists(@systemDir & '\hmm.txt')Then
   ConsoleWrite("Your Good To Go")
Else
   FileCopy(@scriptdir & 'hmm.txt',@SystemDir & 'hmm.txt',9)
   ConsoleWrite("Your Not Allowed To use This")
   Exit
EndIf

#EndRegion

I dont understand Why this part of code doesnt execute as I want it be.

I save a hmm.txt into system32 and run this code but always give me "Your Not Allowed to use This"
even i added the FileCopy and let him paste it to dir and run again and again with same result.
I think I quite dont understand how FileExists or @systemDir works.
Please help me

Link to comment
Share on other sites

Well, for one, there's a backslash missing between @scriptdir/@systemdir and your filename in the FileCopy statement.

Edited by RTFC
Link to comment
Share on other sites

Quote

 

#Region DETECTOR
If FileExists(@SystemDir & "\hmm.txt")Then
   ConsoleWrite("Your Good To Go")
Else
   FileCopy(@scriptdir & "\hmm.tx",@SystemDir & "hmm.txt",9)
   ConsoleWrite("Your Not Allowed To use This")
   Exit
EndIf

 

Quote

now its working
but why other post in forum they use ' instead of "
' seems not working at all

ARG its actually SysWOW64 and not System32 took me lot of tries before it works
 

Edited by senatin
Link to comment
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
 Share

  • Recently Browsing   0 members

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