Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5951 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted

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

Posted

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

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

Posted

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

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

This topic is 5951 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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