GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Get creative! Or just give me a simple answer to an easy question :P (https://gfy.com/showthread.php?t=412114)

Wolfy 01-03-2005 11:15 PM

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?

AndrewKanuck 01-03-2005 11:17 PM

bash
for i in `ls`
do
echo $i >> textfile.txt
done

Wolfy 01-03-2005 11:32 PM

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 01-03-2005 11:32 PM

icq 169334379?

AndrewKanuck 01-03-2005 11:34 PM

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.

kondro 01-03-2005 11:37 PM

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

Wolfy 01-03-2005 11:43 PM

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?

AndrewKanuck 01-03-2005 11:43 PM

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.

Wolfy 01-04-2005 12:02 AM

ok, I'm not ashamed - I don't know how to do a command prompt.

maxcom 01-04-2005 12:05 AM

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

Wolfy 01-04-2005 12:05 AM

ok I got that part now... (next post :P)

Wolfy 01-04-2005 12:07 AM

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

maxcom 01-04-2005 12:08 AM

then you _C_hange _D_irectory to wherever you want like this

cd \windows\ to change into the "windows" directory

Wolfy 01-04-2005 12:10 AM

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?

maxcom 01-04-2005 12:12 AM

type:
cd C:\Documents and Settings\<YOUR WINDOWS USER NAME>\Desktop\

to change onto your desktop

then:
cd <NAME OF YOUR DIRECTORY>

Wolfy 01-04-2005 12:13 AM

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

maxcom 01-04-2005 12:15 AM

you have to type "cd funnyfoldername"

Wolfy 01-04-2005 12:15 AM

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 01-04-2005 12:18 AM

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?

maxcom 01-04-2005 12:18 AM

when in the folder type "dir > output.txt"

maxcom 01-04-2005 12:20 AM

oh duh "dir /b > output.txt"

Wolfy 01-04-2005 12:24 AM

Quote:

Originally Posted by maxcom
oh duh "dir /b > output.txt"


BEEEEEEEEEEEutiful thank you :D maxcom I owe you, hit me up anytime 169334379

kondro 01-04-2005 01:55 AM

Oh, how soon we forget our DOS heritage.

TheMob 01-04-2005 02:00 AM

hmm, get a mac and use the terminal!

kondro 01-04-2005 02:34 AM

I use 2 macs - don't personally own any PCs anymore.


All times are GMT -7. The time now is 03:05 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123