I've got a .BAT file I'm creating to rename a couple of files on my PPC - but doesn't seem you can run a .BAT file on a ppc - is that true??
Printable View
I've got a .BAT file I'm creating to rename a couple of files on my PPC - but doesn't seem you can run a .BAT file on a ppc - is that true??
Natively, no you can't - but there are some alternatives.
http://www.symbolictools.de/public/p.../cmd/index.htm is one, and there used to be a wonderful scripting tool called 'nscriptm', but it seems to had vanished.
Stop Press - found it at http://s-k-tools.com/index.html?m_util.html
Well - that stinks - I'll just write a tiny .Net app to do it - will give me more flexibility anyway - in case the rename fails and what not...
Here's what I'm trying to accomplish if you are interested
http://www.vbforums.com/showthread.php?t=488573
Wow - it is amazing how much time you lose working with the CF...
I am writing a silly little console app - and I cannot for the life of me find out the "current directory" that this console app is running in!
Reflection.Assembly.GetExecutingAssembly is not around
IO.Directory.GetCurrentDirectory is not supported yet
How do I find out the location of the .exe that is running on a PPC??
Ok - I dropped the idea for a .BAT file and I'm instead using a little update program written in .net
This is actually stored in a database on a network server and "dropped" onto a pocket PC with this codeCode:Imports System.IO
Module APCUpd
Sub Main(ByVal args As String())
Dim s1 As String = args(0).Replace("~", " ")
MsgBox(s1)
File.Move(Path.Combine(s1, "APC1.txt"), Path.Combine(s1, "APC2.txt"))
End Sub
End Module
And then it's run with this:Code:Dim ExeData As Byte() = DirectCast(LDrc.ExecuteScalar, Byte())
Dim fs As New FileStream(Path.Combine(strBaseFolder, "APCUpd.exe"), FileMode.CreateNew)
Using bw As BinaryWriter = New BinaryWriter(fs)
bw.Write(ExeData)
bw.Close()
End Using
The reason for the tilde replace is that spaces were causing multiple "arguments" to be passed into the SUB MAIN()Code:Process.Start(Path.Combine(strBaseFolder, "APCUpd.exe"), strBaseFolder.Replace(" ", "~"))
I'm going to use all this for "self-upgrading" programs on PPC when the network database has a new version available.