Page 1 of 1

change directory

PostPosted: Tue Aug 26, 2014 5:21 am
by fieldhopper
Program x is running in directory xy. Now i want to rename the directory 00-00-00/test in xy to 00-00-00/test_delete in xy. How is the way ?
i found no result :roll: .

Re: change directory

PostPosted: Tue Aug 26, 2014 5:45 am
by dec
Hello,

What the problem is?

Anyway, if you like take a look at the npFileOperation action from my npUtil plugin. ;)

Re: change directory

PostPosted: Tue Aug 26, 2014 7:21 am
by dpayer
Now i want to rename the directory 00-00-00/test in xy to 00-00-00/test_delete in xy


Dec's solutions are always more elegant and efficient but you can use NB actions for this as well.

If your app is running in the same folder as the 00-00-00 folder then you can use a batch rename command by 'running' the cmd executable:

Code: Select all
Run "[systemdir]cmd.exe" "/c ren 00-00-00\test test_delete" "Hidden" " " ""


Be sure you do not have the test folder open by another app or it will not be able to rename it (example: if you are watching the folder in a DOS box, you can't rename it or if it has the focus of the Windows Explorer, etc)

Re: change directory

PostPosted: Wed Aug 27, 2014 3:00 am
by fieldhopper
Nice tip. It works. THX dpayer for your tip. You are the friendly hacker of the week :mrgreen: :mrgreen: :mrgreen: .