July 7, 201213 yr Hello I would like to import a file from another network drive through server scripting during my overnight updates. How do I get the file over to the FMP Server documents folder so Server can do the import? I read the documentation for FMP server, but have no idea how to do it. Thank you very much.
July 8, 201213 yr Is your server a Mac? If yes, you can use unix scripting to copy the file to the the documents folder, then import it. You can even combine these scripts in FM now, so it'll run the first script then the second one. Look into scp or generally copying files on linux/unix. I have written stuff like this before (from Linux to Mac server so the tape backup can pick up the file) and once it's in place it works like an oiled machine. Not sure what can be used on Windows. Also, there are plug-ins you can install and run on the server that can do this. 24u has a folder plug-in and then there's the Troi file plug-in. Look into them.
July 8, 201213 yr Solution command line scripting on Windows will do the same thing. Batch files, PowerShell or VBscript, they will all work.
July 8, 201213 yr Author The server is Windows. I think I may have used the Troi file plugin years ago. It's a while since I've used the command line, but I know it's just not that hard. I'll give that a shot. Thanks
July 17, 201213 yr Author Ok, so I'm trying to use a simple batch file to copy the files over. It's basically a few lines that look like this to copy over each file I want to import: copy "I:BUYINGBUY37801.TXT" "C:Usersfilemaker.FILEMAKER-SRVDocumentsImportBUY37801.TXT" It's in the scripts folder and I can schedule it. If I double click on it, it runs fine, but I get Aborted by User when the server runs it through the scheduler. How do I get this to work?
July 17, 201213 yr Author Updated code to move to the correct documents folder: copy "I:BUYINGBUY37801.TXT" "C:Program FilesFileMakerFileMaker ServerDataDocumentsImportDataBUY37801.TXT" and now access is denied so the script does not work when run manually or when scheduled :hmm:
July 21, 201213 yr Author Finally got it to work. Switched the path to UNC syntax after reading this post and moved the files to the path I got from the get documents path function, so now the scheduled server script runs successfully.
Create an account or sign in to comment