November 28, 200619 yr Hi all, Is there any way to delete a file via scripting?? I´m using a file for storing temporary during an importation and i don´t need the file after the import is done. Thanks Edited November 28, 200619 yr by Guest
November 28, 200619 yr Hi BigEye , Welcome to the forums!! Yes, there is a way you can do it by using windows cmd scripting -- not really the real term for it but meh. The syntax you have to use is: del "C:YourFilePathYourFile.YourExtension" In FileMaker --> Enter Script Maker --> Choose Send Event --> insert the calculation: "del "C:YourFilePathYourFile.YourExtension"" To delete YourFile.YourExtension (Assuming that C: Is your drive). Note that you can also use variables filenames aswell (they don't have to be hardcoded)
November 29, 200619 yr Author Thanks Genx it worked very nice but i have to change it to "cmd /c del "MyPathMyFile.Ext""
November 29, 200619 yr ...windows cmd scripting -- not really the real term for it but meh. Nope not the term. The DOS batch language probably came out before you were born. But show it some reverence; it's still alive under the hood and it isn't windows either. Joking aside, I still occasionally use DOS batches (old habits die hard). ;)
November 29, 200619 yr Sure, wont argue with you there... No going to say i'm sorry i missed it when it was running as the general interface.
November 29, 200619 yr But... as far as i know, the CMD console is NOT actually DOS.. Nothing has direct access to DOS if you're in an operating system. The CMD console may interprate DOS commands and pass them on to dos if it deems necessary, but it will filter them to make sure you don't do silly things like format your hard drive Jokes aside though, VBS is quicker and can do a lot more.
November 29, 200619 yr VBS is quicker and can do a lot more. Agree totally, Genx. I'm just getting into VBScript (only mid-level stuff so far). But, thanks to Wim, I've gotten a good base. :wink2:
Create an account or sign in to comment