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.

Send Event Problem

Featured Replies

Hi I am trying to use a send event script by using the following:

"cmd.exe /c md &" "%USERPROFILE%Desktop &" "& Policies::filefoldername

Filefolder name has the name of the file. This should make a folder on the desktop but I can not get past the calculation window. It will not accept this calculation.

Help?

Thank you,

Joseph

Hi I am trying to use a send event script by using the following:

"cmd.exe /c md &" "%USERPROFILE%Desktop &" "& Policies::filefoldername

Try the Following:

"cmd.exe /c md %USERPROFILE%Desktop" & Policies::filefoldername

  • Author

Thank you -- That got me by the calc field option. But it does not make a folder on the desktop. Should that make a script on the desktop?

I tried it....

Didn't work for me on XP with FMP9

Edit:

I saw this on another question - edited some and it created a file on the desktop.... maybe you can adjust to work for a folder :

3 Fields:

....Path Test = calculation with "file:"& Get (DesktopPath) & Substitute (${table}::test desktop file name;" ";"_") & "_AP"

....test desktop file name = text

....test desktop get path set path = Clac, global = Get (DesktopPath)

Script.......

1.Use "Set Variable"

Name: "$fullFilepath"

Value: "file:"& Get (DesktopPath) & Substitute (${table}::file name;" ";"_") & "_AP.pdf"

2.Save record as PDF...

$fullFilepath "restore; no dialog; $fullFilepath; current record

When I put "jones" into "table::test desktop file name" it created the file: jones_AP.pdf

Hope this helps some........ I'll play some but this may be an just an XP thing

Edited for left out content.........

Edited by Guest

gotta run but it's something in the path.

I tried several variations of

"cmd.exe /c md %USERPROFILE%Desktop" & Policies::filefoldername

and at one point did get a folder at :

C:Documents and SettingsbwilliamsSettingsbwilliamsDesktoptesting"

to appear...

It just wasn't where I was looking so I missed it.

I think it's something with cmd being run in the FMP folder on the drive.

Still trying but if not...good luck.

Edited by Guest

  • Author

It has to be an XP thing --- I have tried it again too and no luck anyone have any idea on this. Need to make these folders.

Thank you,

Joseph

I tested this on XP and could not get it to work.

I also tried to bypass filemaker and type into the run line and it still did not work.

I recommend clicking on the start menu, choose "Run..." and test the command to use there.

(the run line behaves almost exactly like the Send Event command)

Once you get it to work, then put it into the send event dialog (replacing the folder name with your variable and adding the extra )

Edited by Guest

It has to be an XP thing --- I have tried it again too and no luck anyone have any idea on this. Need to make these folders.

Thank you,

Joseph

I don't think the normal way will work in XP. I have spent more hrs than I care to admit trying various combinations from the both FMP and the Run command...

I found online - sorry, I lost the page but it said that in XP there is a little know help (?) that you can create more than 1 folder at a time !!!

md one two three ....will give you folders one, two and three in whatever directory.

I have found that this causes my command to split the folder path of "Documents and Settings" up and create the folders:

c:documents

c:documents and settingsand

c:documents and settingssettingsbwilliams

..well you get the idea!

I HAVE GIVEN UP HOPE ON THIS METHOD !!!!

I'm gonna try using the method I gave above to figure a way to get a folder.... somehow.

Here, just try...


"cmd /c mkdir "" & Right( Get(DesktopPath) ; Length(Get(DesktopPath)) - 1 ) & "foldername" & """

You can replace "foldername" with your Field.

It works fine for me on both XP and Vista

$@#$%$#%#$%$%$#

Bloody Aussie..........LOL

I had gone back to the calc. and was actually getting close. I knew I needed the path in quotes and was almost there.

But good job !!

As a side note there's also a function called Quote(string/fieldname) that will enclose whatever is inside it with quotes to save you writing:

""" & Stuff & """


"cmd /c mkdir " & Quote( Right( Get(DesktopPath) ; Length(Get(DesktopPath)) - 1 ) & "foldername" )





is the same as





"cmd /c mkdir "" & Right( Get(DesktopPath) ; Length(Get(DesktopPath)) - 1 ) & "foldername" & """

  • 1 month later...
  • Author

Perfect -- Perfect --- Perfect. Everyone got it almost the same time.. Except for me that is. Thank you everyone. Now my system will make custom folders for filing.

Joseph

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.