Source language: Translate to:

change directory

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

change directory

Postby fieldhopper » Tue Aug 26, 2014 5:21 am

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: .
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: change directory

Postby dec » Tue Aug 26, 2014 5:45 am

Hello,

What the problem is?

Anyway, if you like take a look at the npFileOperation action from my npUtil plugin. ;)
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: change directory

Postby dpayer » Tue Aug 26, 2014 7:21 am

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)
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: change directory

Postby fieldhopper » Wed Aug 27, 2014 3:00 am

Nice tip. It works. THX dpayer for your tip. You are the friendly hacker of the week :mrgreen: :mrgreen: :mrgreen: .
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest