how to check for a file existence

If you need help on how to use the program
Post Reply
fulvio53s03
Posts: 745
Joined: 2007-04-28 05:46:43
Location: Italy

how to check for a file existence

Post by fulvio53s03 »

EDIT
Ho trovato una soluzione per rendere "portabile" il sistema e lo script:
1) in una cartella si deve si deve inserire tutta la cartella AMC portabile
2) nella cartella "Catalogs" si inserisce il data-base da urtilizzare e tutti i files che si vorranno verificare.
3) si apre il data-base interessato e in "Preferenze --> Files" si deve indicare "reopen last used file" e poi aprire / salvare il data-base.
4) l'istruzione da utilizzaree per conoscerre il percorso dei files si ottiene con l'istruzione: "path_attuale := getCurrentdir".
Resto a disposizione per uno script di esempio.

I found a solution to make system and script "portable":
1) you must insert the entire portable AMC folder into a folder
2) insert the database to be used and all the files you want to verify in the "Catalogs" folder.
3) open the relevant database and in "Preferences --> Files" you must indicate "reopen last used file" and then open/save the database.
4) the instruction to use to know the path of the files is obtained with the instruction: "current_path := getCurrentdir".
I remain available for a sample script.
************************************************************************************

I have a problem similar to viewtopic.php?t=42926): how to check for a file existence (not an image).
As before I need to verify if file "Galassia_001.pdf" exists, using a script within AMC portable, with the aim of making my script portable.
Obviousely drive name, C and F can be changed if alla files are migrated to a removable drive or a system with different drive letters, so that original:
program: "C:\portabili\Ant Movie Catalog\MovieCatalog.exe"
dataBase : "F:\$$$ Megasync\$$$ Fantascienza\Fantascienza.amc"
image : "F:\$$$ Megasync\$$$ Fantascienza\Galassia (La Tribuna)\pdf\Galassia_001.pdf"

can be migrated to:
program: "d:\portabili\Ant Movie Catalog\MovieCatalog.exe"
dataBase : "d:\$$$ Megasync\$$$ Fantascienza\Fantascienza.amc"
image : "d:\$$$ Megasync\$$$ Fantascienza\Galassia (La Tribuna)\pdf\Galassia_001.pdf"
.
In ANC Help I saw Help about "Functions to manipulate files and folders" but I need help to create a script "to concatenate" hìthese function so to reach my aim.
I hope to be clear... Would you help me? :stupid:
Post Reply