Joseph31 Posted August 25, 2008 Posted August 25, 2008 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
aholtzapfel Posted August 25, 2008 Posted August 25, 2008 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
Joseph31 Posted August 25, 2008 Author Posted August 25, 2008 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?
aholtzapfel Posted August 25, 2008 Posted August 25, 2008 See File (This works on my computer running vista and filemaker 9, it should work on yours to.) TestFolderCreateOnDesktop.zip
Cabinetman Posted August 30, 2008 Posted August 30, 2008 (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 August 30, 2008 by Guest
Cabinetman Posted August 30, 2008 Posted August 30, 2008 (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 August 31, 2008 by Guest
Joseph31 Posted September 2, 2008 Author Posted September 2, 2008 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
aholtzapfel Posted September 2, 2008 Posted September 2, 2008 (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 September 2, 2008 by Guest
Cabinetman Posted September 2, 2008 Posted September 2, 2008 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.
Genx Posted September 2, 2008 Posted September 2, 2008 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
Cabinetman Posted September 3, 2008 Posted September 3, 2008 $@#$%$#%#$%$%$# 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 !!
Genx Posted September 3, 2008 Posted September 3, 2008 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" & """
Joseph31 Posted October 6, 2008 Author Posted October 6, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now