0
   

Is there a script that I can run on Apple OS equivalent to this Windows script

 
 
Reply Thu 3 Aug, 2017 01:37 pm
This is the script of a .bat file that I run to produce a simple text log of the files that I have on a Windows drive:

Code:G:
dir /o/s >> G:\Me.txt
Echo ================================================= >> G:\Me.txt


Is there something similar that I can run on Apple OS?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 5,678 • Replies: 2
No top replies

 
centrox
 
  2  
Reply Thu 3 Aug, 2017 02:05 pm
In OSX you have the shell; you could try
Code:cd /folder/to/recursively/list
ls -R >> /path/to/your/file.txt
echo "=================================================" >> /path/to/your/file.txt


You would probably have to save it as a file with the .sh extension and call it with /bin/bash.

See here

http://www.macdevcenter.com/pub/a/mac/2004/02/24/bash.html

You have all the guidance for shell scripting for Linux available as well as that specifically for OSX.


InfraBlue
 
  2  
Reply Thu 3 Aug, 2017 02:36 pm
@centrox,
Thank you very, very much, centrox.
0 Replies
 
 

Related Topics

Invisible files in windows - Question by ibouvousaime
Windows 8 tips thread - Discussion by Wilso
Windows XP after April 2014 - Question by clancam
Windows Vista IE8 and "add-ons". - Question by drillersmum
A first look at Windows 7's UI - Discussion by Robert Gentel
Richard - Question by Richard0518
New windows cloud operating system - Discussion by Nick Ashley
Upgrade to Windows 10 - Question by Brandon9000
 
  1. Forums
  2. » Is there a script that I can run on Apple OS equivalent to this Windows script
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/25/2024 at 03:50:18