Jump to content

Troi File Plug-in, move file without renaming?


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

Recommended Posts

This question is similar to Post #149142 .I'd like to use Troi File plug-in to move a file from one location to another without having to retype the file name in the dialog box (2nd dialog that appears) where one chooses the destination of the file.

I can't find any way to do this and I'm having a hard time believing that the plug-in doesn't have a feature that would automatically put the file's name into the "Field name:" field in the "Select Folder" dialog I referred to above.

Thanks in advance for your help.

Link to comment
Share on other sites

Not sure what the 1st and 2nd dialogs are that you're referring to. But if you have the source path, the destination path and the filename then you can just use the Send Event script step to execute a calculated command line directly:

cmd /c move c:fromHerefile.txt d:toHere

Link to comment
Share on other sites

Wim's doesn't require Troi File. But if you want to know how to do it with Troi File, you need to give it the paths. Renaming and moving are much the same thing. You are probably looking at his FileManipulation.fp7 example file. He asks for the file to move and where to move it to. That is because it's the only way to make an easy-to-use example for this. He doesn't want to ask you to type 2 valid file paths manually.

You can ignore the steps in his script that choose the file and destination. Those are just to the paths into 2 global fields. The actual move/rename step is:

TrFile_MoveFile( "-Unused"; FileManipulation::gTheFileSpec ; FileManipulation::gDestFileSpec)

Link to comment
Share on other sites

Thanks, Fenton. That's precisely what I needed to know how to do. The answer was staring me straight in the face ;) in the parameters of the MoveFile function but I was stuck on the example you referred to, i.e. I believed that it HAD to be done in the way of the example...a case of not seeing the forest for the trees.

And thanks to you also, Wim. Your method might not be used in this particular case but you've given me food for thought on a different issue.

Link to comment
Share on other sites

This topic is 6807 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.