Saving a notepad text file as an LDIF file for using ldifde

WhereBob

In Runtime
Messages
108
I'm trying to add a group into my my mangement OU. I am using notepad to create a text file with the .ldf extension but I need to save the file as an LDIF file and not a text file. I don't have this option in my "save as" in either notepad, wordpad or word.
I have saved it as "all files" and "text file" types but when I use ldifde -i -f at the command prompt it can't read and import the file. I assume this is because the file though is saved with the .ldf extension the format of the file is not LDIF.

Any ideas how I can save the file in LDIF file type or get ldifde to open this file? I have tried online converters but none support LDIF or LDF

I using windows server 2003

Thanks

Notepad text file contents:
______________

dn: CN=Management,OU=Marketing,DC=contoso,DC=com
changetype: add
cn: Mangement
objectClass: group
samAccountName: Marketing
__________________________
Saved as Newgroup.ldf

I get "unable to read the import file newgroup.ldf."


I know there are other ways to create a group in an OU but this is for a class
 
When saving it, put the name (including extention) in quotation marks. IE, save it as "newgroup.ldf".
 
Do I type the quotation marks to import on the command line as well?

Thanks for the reply
 
Nope, you shouldnt need to.

Allthought it depends on how the program was programmed...
 
nope didn't work either way with or without quotes. Any idea how I can convert this file to LDIF format?

Thanks for your replies
 
nope didn't work either way with or without quotes. Any idea how I can convert this file to LDIF format?

Thanks for your replies

When going to save, choose All Files first. Then add .LDIF to the end of the file name.
 
When going to save, choose All Files first. Then add .LDIF to the end of the file name.

That doesn't allways work. Sometime it will just save as filename.ldif.txt.

Try changing to all files and using Quotation marks. If that doesnt work, then there must be another problem.
 
In the folder the file is saved in, go into TOOLS>FOLDER OPTIONS>VIEW TAB>Un-check the box that says HIDE EXTENSION FOR KNOWN FILE TYPES. This will then show you if it did what j03 is saying about making it filename.ldif.txt. You can then rename it and delete the .txt off the end and see if that works.
 
^should work. Was going to recomend to do that. You should first save it as a text file then make sure you computer shows file extensions. When done..just rename the extension from .txt to .ldif.

It will work.
 
well total interesting one
new trick
didn't know about saving file in this way
thanks for the information

interesting and catchy post there………………….. interesting read should be a sticky lol

(\_/)
(o_O)
(> <)
/_|_\
 
Back
Top Bottom