Canada
Asked — Edited

Another Helpful Feature Request

Hello Another Helpful Feature Request would be if ARC could create folders, check to see if a folder exists and to be able to delete folders Those 3 would work together with the file commands and would really help in scripts big time:)


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

United Kingdom
#1  

Two workarounds off the top of my head exist...

  1. Batch files. Run a batch file with the exec() command however very old hat now and not recommended.
  2. AHK scripts. Run a compiled AHK script with the exec() command.

Having said that, ARC can already do that with files. Why use folders? Can't you just use files for the same process?

Quote:

FileDelete( filename )

     Deletes a file on your computer

     Example: FileDelete(c:\temp\mylog.txt)

FileWrite( filename, contents )

     Appends text to the specified file. This does not append a new line.

     Example: FileWrite(c:\temp\mylog.txt, My Variable: + $x)

     Example: FileWrite(c:\temp\mylog.txt, servo Position: GetServo(d2))

FileWriteLine( filename, contents )

     Appends text as a new line to the specified file.

     Example: FileWriteLine(c:\temp\mylog.txt, My Variable: + $x)

     Example: FileWriteLine(c:\temp\mylog.txt, servo Position: GetServo(d2))

FileReadClose( filename )

     Closes the file from reading.

     This must call must be performed before writing to the file. Once you begin reading from the file, the file is OPEN. Closing the file will reset to the start once you begin reading again.

     Example: FileReadClose(c:\temp\mylog.txt)

FileReadReset( filename )

     Resets the file to the beginning.

     If you read to the end of a file, this function must be called to reset reading from the beginning of the file.

     Example: FileReadReset(c:\temp\mylog.txt)

FileExists( filename )

     Returns a 1 or 0 if the specified file exists.

     Example: $fileExists = FileExists(c:\temp\mylog.txt)

FileReadEnd( filename )

     Returns a 1 or 0 if the file has reached the end.

     Example: $fileEnd = FileReadEnd(c:\temp\mylog.txt)

FileReadChar( filename )

     Returns the next character in the specified file

     Example: $char = FileReadChar(c:\temp\mylog.txt)

FileReadLine( filename )

     Returns the next line of the specified filename.

     Example: $line = FileReadLine(c:\temp\mylog.txt)

FileReadAll( filename )

     Returns the entire contents of the specified file.

     Example: $contents = FileReadAll(c:\temp\mylog.txt)

FileReadLineRandom( filename )

     Returns a random line within the specified file

     Example: $randomLine = FileReadLineRandom(c:\temp\mylog.txt)

Again, could you give an example of how you intend to use this? It helps figure out solutions and gives an insight in to how people plan to use ARC.

Canada
#2  

Not files but folders ARC don't work with folders at all it works with files but not folders:( It would be vary handy if it would create and delete folders

Canada
#3  

Will add examples after my nap again ive been up all night and now cant think lol So I bid you all a good morning:) or should I say good night lol

Canada
#4  

If ARC can make folders then users would not have to deal with opening scripts to look for what ever folders are needed and go and make all them on there own as the scripts would make them when needed. Many scripts will need to make many many folders and its not nice when you get a new script and have to try to find how to make it work ... we dont have to do that when we install other programs so why would a user want to when adding a new script. I plan on doing up many usefull scripts and releace them for others to use and i want them to be as ez to install as can be "Its calles Ez-Robot for a reasen":) In time many other scripters will be adding there own scripts for others to use. I cant wait to see what all scripts others will post in the next year or so:D

examples

Games there will be many

$dirExists = DirExists("c:\EZ-Data") = no MKdir("c:\EZ-Data")

$dirExists = DirExists("c:\EZ-Data\Games") = no MKdir("c:\EZ-Data\Games")

$dirExists = DirExists("c:\EZ-Data\Games\trivia") = no MKdir("c:\EZ-Data\Games\trivia")

$dirExists = DirExists("c:\EZ-Data\Games\trivia\Data") = no MKdir("c:\EZ-Data\Games\trivia\Data")

Flight sim These scripts will need to make well over 100.000 folders over time

$dirExists = DirExists("c:\EZ-Data") = no MKdir("c:\EZ-Data")

$dirExists = DirExists("c:\EZ-Data\FlightSim") = no MKdir("c:\EZ-Data\FlightSim")

$dirExists = DirExists("c:\EZ-Data\FlightSim\Country") = no MKdir("c:\EZ-Data\FlightSim\Country")

$dirExists = DirExists("c:\EZ-Data\FlightSim\Country\State-Provance") = no MKdir("c:\EZ-Data\FlightSim\Country\State-Provance")

$dirExists = DirExists("c:\EZ-Data\FlightSim\Country\State-Provance\City") = no MKdir("c:\EZ-Data\FlightSim\Country\State-Provance\City")

$dirExists = DirExists("c:\EZ-Data\FlightSim\Country\State-Provance\City\APID") = no MKdir("c:\EZ-Data\FlightSim\Country\State-Provance\City\APID")

And so on

there will be many many more scripts that will need to make folders

#5  

Ok... Maybe I am missing something... But are these directories going to be constant? Meaning once they are initially created that's all you need or as the program progresses you are going to need new directories created on a regular basis?.... My point is that if the directories are static and new ones don't need to be created then why not just manually create them from the get go?

Canada
#6  

Once created most will remain till the script is removed many of the scripts will have to make and delete folders often depending on the script and what the user is doing Some scripts will remove folders after time as they will no longer be needed and its a pain to have many useless folders left after they are no longer being used

Say a child grows up and moves out there will be no point in having all there data left on the system as they will no longer be there to use it and so on

My flight sim scripts will make hundreds of thousands of folders in its use

The point is many users don't know how to create folders and most will not want to open a new script to try and find what folders are needed when ARC can do it when needed

If we had to open windows and look for what folders are needed before we can install it Microsoft would have gone bankrupt in the first year