Harald Posted October 12, 2005 Share Posted October 12, 2005 I am stuck - I just want to let FM rename a pdf-file via a send event script with a calculated cmd-string but can't figure out how to tell win2k that this cmd should rename the file in a special folder eg "cmd /c move /y c:Documents and SettingsAll UsersDocumentsprinted.pdf c:Documents and SettingsAll UsersDocumentsVariableRcdID.pdf" This does not work at all but: If this command is done on root level renaming works: "cmd /c move /y c:printed.pdf c:VariableRcdID.pdf" So it has something to do with the path names in the cmd-string - how do I force and tell the cmd to use the right folder locations?? Any Ideas or hints? Link to comment Share on other sites More sharing options...
SlimJim Posted October 12, 2005 Share Posted October 12, 2005 I think you will find that the spaces in the Documents and Settings folder name are the cause of the problem. One solution which I have found works on most variations of windows (I do not have Win2000) is to replace Documents and Settings with the old-fashioned DOS name whatever that is on your system - probably Docume~1. Link to comment Share on other sites More sharing options...
Perren Posted January 6, 2006 Share Posted January 6, 2006 Here's what I do. the command line is VERY picky about where to use quotation marks. Trying to escape these in calculated fields became a nightmare for me, but I finally conquered it. But that's another story... Here's the shell code that gets fed to the send event step. cmd /c If not Exist "C:My Documentsdirectory Amy file.pdf" move "C:Documents and SettingsuserDesktopmy file.pdf" "C:My Documentsdirectory Amy file.pdf" This does the additional job of checking for an existing file in the destination as not to overwrite it. Just strip out the "if not exist "file" " section if you don't want that. Hope this helps, --Perren Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6692 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