Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-03-2005, 11:15 PM   #1
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
Get creative! Or just give me a simple answer to an easy question :P

I have a folder full of odd named pages, I want to copy all the names and then paste the list to notepad so I can search replace ctrl+v and etc. I can't just copy paste because it copies the whole file rather than just the name, and I can't do it one at a time manually because i make too many mistakes with these names - there's more than 200 different odd names to type. How do I get this list of filenames onto a notepad?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:17 PM   #2
AndrewKanuck
Confirmed User
 
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
bash
for i in `ls`
do
echo $i >> textfile.txt
done
__________________
AndrewKanuck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:32 PM   #3
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
I'm not familiar with "bash" - but I have seen people throw a few lines like this around before and i googled it... looks interesting, anyone care to walk me through it once?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:32 PM   #4
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
icq 169334379?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:34 PM   #5
AndrewKanuck
Confirmed User
 
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
Quote:
Originally Posted by Wolfy
I'm not familiar with "bash" - but I have seen people throw a few lines like this around before and i googled it... looks interesting, anyone care to walk me through it once?
What I gave you was line by line what you would need to type into the shell where the files are located and it would generate the text file with every file name.
__________________
AndrewKanuck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:37 PM   #6
kondro
Registered User
 
Join Date: Nov 2004
Location: Gold Coast, Australia
Posts: 23
The trouble is, I think Wolfy wants to do this on windows.

To do this you could do something like:

Code:
dir > output.txt
on the command prompt in the correct directory (use cd \path\to\dir).

Hope this helps,

Kondro
kondro is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:43 PM   #7
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
i need the bash program for this though, right? I found a few mac programs that would do what Andrew suggested, but kondro is right, I am using windows. What program do I use for windows to run this type of thing?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-03-2005, 11:43 PM   #8
AndrewKanuck
Confirmed User
 
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
Quote:
Originally Posted by Wolfy
i need the bash program for this though, right? I found a few mac programs that would do what Andrew suggested, but kondro is right, I am using windows. What program do I use for windows to run this type of thing?
to do dir > output.txt - you'd simply go to a command prompt.
__________________
AndrewKanuck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:02 AM   #9
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
ok, I'm not ashamed - I don't know how to do a command prompt.
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:05 AM   #10
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
Quote:
Originally Posted by Wolfy
ok, I'm not ashamed - I don't know how to do a command prompt.

Start -> Run... -> Open: cmd -> OK
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:05 AM   #11
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
ok I got that part now... (next post :P)

Last edited by Wolfy; 01-04-2005 at 12:07 AM..
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:07 AM   #12
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
actually I jut found it on the net, you can right click the start button and click on command prompt
I have no idea how to proceed from here, I'll play a moment I guess
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:08 AM   #13
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
then you _C_hange _D_irectory to wherever you want like this

cd \windows\ to change into the "windows" directory
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:10 AM   #14
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
fuck I have no idea how this works - my folder is on my desktop, I type in the command prompt:

dir folder > output.txt

what am I missing?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:12 AM   #15
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
type:
cd C:\Documents and Settings\<YOUR WINDOWS USER NAME>\Desktop\

to change onto your desktop

then:
cd <NAME OF YOUR DIRECTORY>
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:13 AM   #16
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
heh, I think the right click option may have been added when I installed that last program I found on the net.. I am in windows, but "funnyfoldername" is apparently not a valid command prompt :P
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:15 AM   #17
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
you have to type "cd funnyfoldername"
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:15 AM   #18
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
Quote:
Originally Posted by maxcom
type:
cd C:\Documents and Settings\<YOUR WINDOWS USER NAME>\Desktop\

to change onto your desktop

then:
cd <NAME OF YOUR DIRECTORY>
Cool, I did all that (I feel like I accomplished something :P)

It opened a text file, but it's empty. I typed

output.txt


...when in the folder.. ?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:18 AM   #19
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
ok I got it now, it isn't exactly what I wanted - now it has a ton of time and date stamps in the file, but I'm pretty sure I can just open this up in a spreadsheet and kill the unwanted stuff - unlless you have a better idea maxcom?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:18 AM   #20
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
when in the folder type "dir > output.txt"
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:20 AM   #21
maxcom
Confirmed User
 
Join Date: Sep 2002
Location: Seattle, WA
Posts: 447
oh duh "dir /b > output.txt"
maxcom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 12:24 AM   #22
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
Quote:
Originally Posted by maxcom
oh duh "dir /b > output.txt"

BEEEEEEEEEEEutiful thank you :D maxcom I owe you, hit me up anytime 169334379
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 01:55 AM   #23
kondro
Registered User
 
Join Date: Nov 2004
Location: Gold Coast, Australia
Posts: 23
Oh, how soon we forget our DOS heritage.
kondro is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 02:00 AM   #24
TheMob
Confirmed User
 
Join Date: Jan 2003
Location: 2006
Posts: 8,584
hmm, get a mac and use the terminal!
TheMob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-04-2005, 02:34 AM   #25
kondro
Registered User
 
Join Date: Nov 2004
Location: Gold Coast, Australia
Posts: 23
I use 2 macs - don't personally own any PCs anymore.
kondro is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.