Jump to content

issue with df command-line param <item>


Recommended Posts

Dear Developers,

 

I encountered an issue while using df.exe.

 

I use a file manager with scripting capability (XYplorer) and integrate df.exe into it with a few lines of code.

 

For instance, to defrag the selected items (files and/or folders), I simply write

open '"D:\Portable\Defraggler\df.exe" <selitems> /S';

where <selitems> is something like the following:

"C:\folder1" "C:\file1.avi" "C:\folder2\subfolder2"

 

However, when I use a user-defined varaible, in the format of $ItemsToDefrag, and feed it to df.exe, it fails to work. e.g.

//Comment: this doesn't work
 $ItemsToDefrag = quote("C:\file1.avi");
 open '"D:\Portable\Defraggler\df.exe" $ItemsToDefrag /S';

 

Here quoting is not an issue, my guess is that df.exe somehow doesn't like the character "$".

 

Could you please confirm this issue involving "$"? it seems that df.exe handles "<selitems>" without any problem.

 

Thank you very much!

Link to comment
Share on other sites

  • Moderators

Hi DickP, and welcome to the forum.

 

These are the published commands recognized by df.exe, and if it isn't there, I'm guessing it won't be recognized.

 

http://www.piriform.com/docs/defraggler/advanced-usage/command-line-parameters

 

Not very positive, but the above is all I have to go on. Unless, someone else knows different, and I'm sure they'll contribute if they do. :)

 

 

EDIT: I had to stick the P on your name. It was censored by the forum software. :lol:

Link to comment
Share on other sites

Hi d***, and welcome to the forum.

 

These are the published commands recognized by df.exe, and if it isn't there, I'm guessing it won't be recognized.

 

http://www.piriform.com/docs/defraggler/advanced-usage/command-line-parameters

 

Not very positive, but the above is all I have to go on. Unless, someone else knows different, and I'm sure they'll contribute if they do. :)

 

Thanks Dennis, I referred to the command-line syntax prior to my scripting in my file manager, as the topic suggested, the issue is about <item>:

When I feed df with file manager's native variable called <seltiems>, df likes it, I guess that's because the "<>" format is what df likes, however, in order to do something more flexible, I have to use a user-defined variable, indicated by the "$" character. Then df doesn't like it anymore.

 

But that's my guess, I'm still very confused, because that's just a variable, it should be resolved to its value...

Link to comment
Share on other sites

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.