Questions tagged [file-exists]

A "FileExists" method provides a mechanism to determine if a specified path/file exists.

Overview

FileExist methods, which are available in most languages, typically have a path/filename parameter and return a Boolean value, indicating whether the file exists.

Implementations

The following links provide reference to the method descriptions for various languages:

606 questions
-1
votes
1 answer

I need a bit of advice on a Batch file If exists then followed with a loop

I am trying to create a batch file that copies files from one folder to a new one that it creates, (mkdir "new folder") and renames the folder 1. If folder 1 already exists then name it folder 2. This would loop by adding 1 to the folder name until…
tomthegr8
  • 3
  • 1
-1
votes
1 answer

PHP file_exists method not working as expected

I am trying to set the background of the html body dynamically. Basically if a file exists, use it, otherwise use the default. But it keeps using the default regardless of whether the file exists or not.