Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Check if a file exists

Featured Replies

Hi,

I would like to check if a file exists before performing an operation on it.

I have tried using the troi file plugin's example which modified slightly for me looks like this:

if [Left(External("TrFile-GetDateCreated"; INVENTORY::ImagePath) ; 2 ) <> "$$"]

Set Field [iNVENTORY::ImageExists; "Yes"]

Else

Set Field [iNVENTORY::ImageExists; "No"]

End if

Which unfortunately always returns YES.

INVENTORY::ImagePath is a network path which looks like this "INVENTORYIMAGE.JPG".

If anyone has any idea's, or even another way to check i would appreciate it very much.

Thanks in advance,

Jason

AFAIK windows will remember a network path after you have closed the window that you opened it in. Same on Macs really.

Can you setup a mapped drive? Then it can be disconnected properly. Bear in mind that the path will need to be augmented with the mapped drive letter.

  • Author

Changing the path to a mapped drive has the same result.

If it helps, the value returned by troi is "1".

Thanks again...

  • Author

Strangely enough, i couldnt get that example working but i can achieve the same results using this instead:

Left(TrFile_GetFileSize("" ; $imgPath );2) = "$$"

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.