Jump to content

[Solved] dircreate() return bug


Recommended Posts

$DirCreate = DirCreate('/')
ConsoleWrite($DirCreate & @CRLF); Returns 1

$DirCreate = FileExists('/')
ConsoleWrite($DirCreate & @CRLF)

Success: Returns 1.

Failure: Returns 0 if there is an error creating the directory.

The problem is that if I have tons of lines of code & tons of consolewrite() return values, it will return 1 & I will think that folder creation was successful & waist my time searching for a problem somewhere else. It took me almost a whole hour to figure out why was my code bugged.

So if possible plz fix it. Ty.

Edit same problem goes for FileExists

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Hi,

your example is not for testing.

This works perfect:

$DirCreate = DirCreate(@ScriptDir & "\testfolder")
ConsoleWrite($DirCreate & @CRLF)
$DirCreate = FileExists(@ScriptDir & "\testfolder")
ConsoleWrite($DirCreate & @CRLF)
ShellExecute ("explorer.exe", @ScriptDir & "\testfolder")

You should post reproducable example. Otherwise i don't know where your problem is

;-))

Stefan

Link to comment
Share on other sites

my sample was intentional:

$DirCreate = DirCreate('/Flowers gallry II/')
ConsoleWrite($DirCreate & @CRLF)
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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